| Summary: | [compiler] Eclipse compiler reports syntax error as class that cannot be resolved | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Heath Borders <heath.borders> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | Olivier_Thomann, philippe_mulet, stephan.herrmann |
| Version: | 3.4 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
The third error is reported when the statement recovery is on. Eclipse errors are: ---------- 1. ERROR in X.java (at line 3) (Boolean)args.getClass(); ^^^^^^^^^ Boolean cannot be resolved ---------- 2. ERROR in X.java (at line 3) (Boolean)args.getClass(); ^ Syntax error, insert "AssignmentOperator Expression" to complete Assignment ---------- 3. ERROR in X.java (at line 3) (Boolean)args.getClass(); ^ Syntax error, insert ";" to complete BlockStatements ---------- Note: batch compiler statement recovery is not enabled by default. Why is that so ? Any chance for 3.6? What are you expecting for 3.6? I just tested 3.6M6 and I still get the message "Boolean cannot be resolved". javac's error message is better. If this is too esoteric, I don't care if its marked wontfix or if it is delayed. ASTView shows recovered AST like this
(Boolean) = $missing$;
args.getClass();
i.e, we end up with assignment whose LHS is a parethesized expression. Surely that structure is not anticipated during resolveType().
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Build ID: M20080911-1700 Steps To Reproduce: File foo: public class Foo { public static void main(String[] args) { (Boolean)args.getClass(); } } javac reports the following errors: 1. ERROR in Test.java (at line 5) (Boolean)args.getClass(); ^ Syntax error, insert "AssignmentOperator Expression" to complete Assignment ---------- 2. ERROR in Test.java (at line 5) (Boolean)args.getClass(); ^ Syntax error, insert ";" to complete BlockStatements Eclipse reports the following error: Boolean cannot be resolved More information: