Community
Participate
Working Groups
The following two java files will generate the error on the file user.BugUser that InternalInfo$ is not a type. However, it is defined inside the file definer.BugContainer as a protected inner class. These classes will compile and run with sun jdk java (tested on macosx 1.4.2_05 and linux 1.4.2_06). This happens both with 3.0.0 and 3.0.2 ------------------- package definer; public abstract class BugContainer { protected static class InternalInfo$ { public InternalInfo$() {} } abstract protected InternalInfo$ getInfo(); } --------------------- package user; import definer.BugContainer; public class BugUser extends BugContainer{ protected InternalInfo$ getInfo() { return new InternalInfo$(); } }
The issue is also reproducable on Eclipse 3.1.0M6. It happens only when BugUser is compiled after BugContainer. It seems to be an issue in the compiler. If the "$" is removed from the "InternalInfo$" the problem is gone.
changed verfsion field to reflect Tims obserrvation above
Still happens using build N20050608-0010. Set version filed back to 3.0 as this problem was discovered on 3.0 version...
Issue occurs only when compiling BugUser against binary form of BugContainer. Added InnerEmulationTest#test127-128.
Problem comes from poor decoding of source name in this scenario. IBinaryType doesn't surface the inner name of member, and heuristic doesn't work. Adding IBinaryType#getSourceName() to hide the magic, and allow classfile reader to simply surface the inner source name.
Added IBinaryType#getSourceName() to surface the real info from classfile. Fixed
Verified for 3.2 RC1 using Build id: I20060413-0010.