mcimadamore@359: /* jjg@384: * @test /nodynamiccopyright/ mcimadamore@359: * @bug 6521805 mcimadamore@359: * @summary Regression: JDK5/JDK6 javac allows write access to outer class reference mcimadamore@359: * @author mcimadamore mcimadamore@359: * mcimadamore@359: * @compile/fail/ref=T6521805a_1.out T6521805a.java -XDrawDiagnostics mcimadamore@359: * @compile/ref=T6521805a_2.out T6521805a.java -XDwarnOnSyntheticConflicts -XDrawDiagnostics mcimadamore@359: */ mcimadamore@359: mcimadamore@359: class T6521805a { mcimadamore@359: mcimadamore@359: static class Outer { mcimadamore@359: T6521805a this$0 = null; mcimadamore@359: } mcimadamore@359: mcimadamore@359: public class Inner extends Outer { mcimadamore@359: public void foo() { mcimadamore@359: this$0 = new T6521805a(); mcimadamore@359: } mcimadamore@359: } mcimadamore@359: }