Menu

#4 antic thinks Java "new" expr ending in '}' is a statement

open
nobody
None
5
2004-11-04
2004-11-04
No

Bug reported against antic version 1.11.1.
Flags used when running: -java
OS: OS X (10.3.5)

<pre> public Object braceDoesntEndStatement()
{
// This method generates three warnings, all of them
resulting from the
// mistaken belief that the two semicolons end null
statements, and thus
// presumably that the preceding '}'s end their statements.
if (true)
return new int[] {1, 2};
else
return new Object(){};
}</pre>

Discussion


Log in to post a comment.

MongoDB Logo MongoDB