FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 1362 : Error compiling when 'new' is first word in an 'else' block
Last modified: 2010-03-15 14:44
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
FIXED -
Pr
i
ority:
P4
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
jnz
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2009-10-27 17:18
This fails to compile:
if (true) {} else { new String(); }
with the error:
Syntax error on token "}", { expected after this token
But these all work:
if (true) {} else new String();
if (true) { new String(); } else {}
if (true) {} else { String x = new String(); }
int y; if (true) {} else { y = 0; new String(); }
if (true) {} else { int z; new String(); }
try {} finally { new String(); }
Additional Comment
#1 From fry 2010-02-16 12:35
***
Bug 1377
has been marked as a duplicate of this bug. ***
Additional Comment
#2 From fry 2010-02-17 20:44
k, added to the preprocessor bugs list.
Additional Comment
#3 From MrFeinberg 2010-03-15 09:51
Fixed; please test and confirm.
Additional Comment
#4 From fry 2010-03-15 14:44
verified fixed by jdf for 0180.