Summary: | javac accepts this code while Eclipse does not | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | d <dsmall> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | RESOLVED INVALID | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | orbeon-development |
Version: | 3.0.1 | ||
Target Milestone: | 3.1 M3 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
d
2004-10-15 18:39:40 EDT
Note that jikes is also reporting a problem. Found 1 semantic error compiling "C:/tests_sources/C1.java": 12. return C1.this.toString(); ^-----^ *** Semantic Error: An instance of "C1.this" exists, but is not accessible at this location because an intermediate anonymous type occurs in an explicit constructor call. After reviewing JLS it seems Eclipse compiler is behaving correctly. See section 8.8.5.1 Explicit Constructor Invocations : http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#229267 Set bug to "invalid" as compiler behaves accordingly to the spec |