Community
Participate
Working Groups
Using latest the following code is rejected with: ---------- 1. ERROR in C:\tests_sources\X.java (at line 3) Object this$0; ^^^^^^ Duplicate field X.Y.this$0 ---------- 1 problem (1 error) public class X { class Y { Object this$0; } public static void main(String[] args) { } } Since this$0 is a field generated by the compiler, this code should compile.
Added Compliance_1*#test098. Fixed. Collisions are resolved by renaming this$0 into this$0$ (repeating adding $ as long as collisions occur).
Verified in I20050214