Community
Participate
Working Groups
Build 2.1M4 On the following example, the first anonymous (subclass of X) should be named X$1. It is currently X$2, where the latter anonymous type get generated as X$1. public class X { class A { } public static void main(String[] arguments) { new X(){}.new A(){}; } }
Local type constantpool computation occurs during codegen. As a consequence, since the name of the anonymous subclass of A is required first (enclosing instance is generated just after new<anonymous-sub-A> bytecode sequence), the ordering is wrong. Can be fixed by moving the naming to the flow analysis where the proper order is used to traverse the parse tree.
Fixed. Constant pool names are now computed during flow analysis.
Verified.