Community
Participate
Working Groups
Build 20030703 On following source (missing first parameter name), public class X { public void foo(X, Object o, String s) { } } The inferred syntax errors are not helpful: Syntax error, insert "}" to complete ClassBody line 4 Syntax error on token ",", ; expected line 4 Syntax error on token ",", . expected line 4 Syntax error on token "(", { expected after this token line 4 Syntax error on token ")", ; expected line 4 Syntax error on tokens, delete these tokens line 4
Body start is placed on first opening parenthesis since rest of the signature is broken. This interferes with diet/body dual diagnosis. When diagnosing incorrect signatures, it should provide the entire method declaration, leaving the diagnosis processing it. Then no subsequent diagnosis should occur when parsing the method body (and it should simply skip it then).
Fixed.
Verified.