Community
Participate
Working Groups
build 20040506 With the following test case public class X { public void foo() { (X) foo(); } } the error messages are Syntax error, insert ";" to complete BlockStatements Syntax error, insert "AssignmentOperator ArrayInitializer" to complete ArrayInitializerAssignement The corresponding grammar rule is InvalidArrayInitializerAssignement ::= PostfixExpression AssignmentOperator ArrayInitializer This rule exist to perform better diagnose for expression like x = {0} But it would not be suggested as possible correction. (original bug is bug 12287)
If this is resolved in 1.5 branch, I wouldn't worry about it for 3.0.
I saw it yesterday in HEAD. Code like this: class X { void foo(int i) { i; } } produces the same error.
deferred post 3.0
reopen
Fixed and tests added SyntaxErrorTest#test05() -> test06() Updated tests ComplianceDiagnoseTests ParserTest
Verified using I20060328-0010 for 3.2M6
*** Bug 112542 has been marked as a duplicate of this bug. ***