Community
Participate
Working Groups
R1.0, build 137 I will post code that reproduces this, once I can extract it (at the moment its all enmeshed in our multi-thousand-line plugin) ... I have two classes in two of our packages: editors.Editor (extends EditorPart) operations.Updater (extends operations.Modifier which itself extends only Object) has a protected static inner class UpdateOperation (that is an extension of WorkspaceModifyOperation) All is well; there are no errors anywhere. Now I create a third class Preparer, which implements Runnable, and which both Editor and Updater (and UpdateOperation) need to know about: if I put it into Editor as a public static inner class, all is well; if I make it a top-level class in operations, all is well; if I put it into Updater as an public static inner class, I get the compiler-bug error, on line 1 of Editor.
I remember we fixed a couple such scenarii in the 2.0 stream. You might want to give it a try with the R2.0 build so as to see if this bug got fixed already.
This would be a duplicate of old bug 1GL1HF8 - Missing implementation in the compiler compiling invalid code (referenced in build notes, section for build 20011011). Bug also archived internally as: http://bugs.ott.oti.com/show_bug.cgi?id=73682 ------------ begin original RPRS header ----------------------------- PRID: 1GL1HF8 Title: ITPJCORE:WIN2000 - Missing implementation in the compiler compiling invalid code Plan: C - No Commitment Severity: 0 - Information Exchange Customer: INTERNAL Contact: Olivier Thomann Owner: Olivier Thomann CPRID: Creator: Olivier Thomann Create Date: Sat Nov 03 18:51:54 EST 2001 Component Name: ITPJCORE - Java IDE Core Editor: Philippe Mulet Edit Date: Fri Nov 09 18:51:54 EST 2001 Edit Time: Tue Mar 26 05:20:39 EST 2002 Folder Name: Component Root\Closed\Fixed\ ------------ end original RPRS header ------------------------------- PRODUCT VERSION: 202 HEAD DESCRIPTION: [class D { class E { E(Object o, Object o1, Object o2, F f) {} void execute() {} } } class F { F(Object o) { } } public class A2 { private abstract class B { public Object get() { return null; } } private class C extends B { public void foo() { (new D.E(null, null, null, new F(get()) {}) {}).execute (); } } } ] Compiling the code above. I got: 1. ERROR in D:/temp/A2.java !! no source information available !! Missing code implementation in the compiler ---------- Compiled 26 lines in 1773 ms (14.6 lines/s) 1 problem (1 error) javac 1.3 reports the problem nicely: A2.java:23: No enclosing instance of class D is in scope; an explicit one must be provided when creating inner class D. E, as in "outer. new Inner()" or "outer. super()". (new D.E(null, null, null, new F(get()) {}) {}).execute (); ^ A2.java:23: Incompatible type for constructor. Can't convert A2.C to D. (new D.E(null, null, null, new F(get()) {}) {}).execute (); ^ 2 errors NOTES: OT (03/10/2001 5:20:19 PM) If I change this code to be: [class D { class E { E(Object o, Object o1, Object o2, F f) {} void execute() {} } } class F { F(Object o) { } } public class A2 { private abstract class B { public Object get() { return null; } } private class C extends B { public void foo() { (new D(). new E(null, null, null, new F(get()) {}) {}).execute(); } } } ] Then there is no more problem. If I write: [class D { class E { E() {} void execute() {} } } public class A2 { private class C { public void foo() { new D.E().execute(); } } } ] It works fine and I got: 1. ERROR in D:/temp/A2.java (at line 12) new D.E().execute(); ^^^^^^^^^ Must explicitly qualify the allocation with an enclosing instance of type D (e.g. x.new A() where x is an instance of D). ---------- Compiled 15 lines in 1732 ms (8.6 lines/s) 1 problem (1 error) PM (10/8/2001 6:37:00 PM) Incorrect error reporting caused to enter inappropriate code path. Added 3 regression tests. Fixed. --------------------------------------------------------------------------------
The 3 regression tests are: InnerEmulationTest#test33, test34, test35
Closing, please reopen if symptoms persist in R2.0.