Summary: | AST/DOM: IllegalArgumentException generated by bad source | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Jared Burns <jared_burns> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | eclipse |
Version: | 2.0 | ||
Target Milestone: | 2.0 M5 | ||
Hardware: | Other | ||
OS: | other | ||
Whiteboard: |
Description
Jared Burns
2002-03-28 12:03:44 EST
What do you expect? You don't even provide a compilation unit source. We don't expect a valid AST (the bad source was clearly from a bug), but the method shouldn't blow up. In fact this is a bug in the error recovery. The compilation unit declaration is returned with two types. One anonymous class and one class. An anonymous class cannot be a toplevel type. This doesn't work. I am expecting the beginning of the code to be ignore till the declaration of the class Hello. The converter blew up trying to set the name of the anonymous type declaration. Fixed recovery to filter out anonymous toplevel types during the updating phase. Regression test (DietRecoveryTest#test102) added. Fixed. |