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