Summary: | Should we reject that code? | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.1 | ||
Target Milestone: | 2.1 M5 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Olivier Thomann
2002-11-29 11:45:54 EST
I believe we would use H.this, instead of this... need to investigate. Actually, we accept this code since we do not eagerly require an enclosing instance for local types, until actually needed. On the following example though, we are getting an internal failure which we shouldn't: public class X { public static void main(String[] arguments) { new X(null).foo(); System.out.println("DONE"); } X(Object o){ } void foo(){ class A { private A() { } } class B extends X { B() { super(new A(){ void foo() { System.out.println(X.this); } }); } } } } Both issues fixed. We will now reject original code. Verified. |