Summary: | [compiler] Invalid field initializer not flagged as error | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Frederic Fusier <frederic_fusier> | ||||
Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> | ||||
Status: | VERIFIED WORKSFORME | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | amj87.iitr, philippe_mulet, srikanth_sankaran | ||||
Version: | 3.3 | ||||||
Target Milestone: | 3.7 M1 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Frederic Fusier
2007-11-20 12:21:13 EST
Not a regression as this happened at least since 3.1.2... If error diagnosis cannot infer anything, then as a fall-back approach, the original (ugly) syntax error should be reinjected back. Separately from that, the diagnosis shouldn't fail to produce a diagnosis. This problem is not reproducible on HEAD: Here are the errors I get: Description Resource Path Location Type Syntax error on token ";", { expected after this token Test.java /_pasted_code_/src line 4 Java Problem Syntax error on token "(", ; expected Test.java /_pasted_code_/src line 15 Java Problem Syntax error on token ")", ; expected Test.java /_pasted_code_/src line 15 Java Problem Syntax error on token "}", delete this token Test.java /_pasted_code_/src line 14 Java Problem Syntax error on token "default", invalid Label Test.java /_pasted_code_/src line 9 Java Problem Syntax error on token(s), misplaced construct(s) Test.java /_pasted_code_/src line 3 Java Problem Syntax error on tokens, Label expected instead Test.java /_pasted_code_/src line 6 Java Problem Syntax error, insert "}" to complete ClassBody Test.java /_pasted_code_/src line 18 Java Problem I'll add a regression test and close this as WORKSFORME. Created attachment 173618 [details]
Proposed regression test
Released regression tests on HEAD for 3.7 M1. Verified for 3.7M1 using build I20100802-1800. |