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=T6521805d.out T6521805d.java -XDrawDiagnostics mcimadamore@359: */ mcimadamore@359: mcimadamore@359: class T6521805 { mcimadamore@359: mcimadamore@359: static class Inner extends T6521805.Outer { mcimadamore@359: mcimadamore@359: Inner(T6521805 t) { mcimadamore@359: t.super(); mcimadamore@359: } mcimadamore@359: mcimadamore@359: T6521805 this$0 = null; mcimadamore@359: mcimadamore@359: public void foo() { mcimadamore@359: this$0 = new T6521805(); mcimadamore@359: } mcimadamore@359: } mcimadamore@359: mcimadamore@359: class Outer {} mcimadamore@359: mcimadamore@359: }