| Summary: | [1.5][dom] Syntax error in for each statement makes all method statements disappearing | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Frederic Fusier <frederic_fusier> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | VERIFIED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | david_audel |
| Version: | 3.1 | ||
| Target Milestone: | 3.2 M5 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
This is a known issue. When a syntax error arises in a method, the whole method is considered as a problem method and has no statement. Talk to David to find out if the recovery at the statement level is supposed to be in. Currently there is no statement recovery *** This bug has been marked as a duplicate of 42253 *** Verified for 3.2 M5 using build I20060215-0010. |
Using 3.1 RC1 public class X { public static void main(String[] args) { int i= 0; for (String s args) { System.out.println("ZORK"); } int j = 0; int k=i+j; } } Looking at ASTView on main method declaration which misses ':' in for statement, I can see method is malformed (OK) and does not content any statement... As recovery rightly suggests to insert ':' after s formal parameter, I would expect AST convertion able to display method statements even with this syntax error.