blob: 2cdce03c123e47307be2dfebd795783313792fb0 [file] [log] [blame]
Maurizio Cimadamorea11cd672009-08-11 01:13:14 +01001/*
Jonathan Gibbonsaf2f2e82009-08-27 11:08:27 -07002 * @test /nodynamiccopyright/
Maurizio Cimadamorea11cd672009-08-11 01:13:14 +01003 * @bug 6521805
4 * @summary Regression: JDK5/JDK6 javac allows write access to outer class reference
5 * @author mcimadamore
6 *
7 * @compile/fail/ref=T6521805d.out T6521805d.java -XDrawDiagnostics
8 */
9
10class T6521805 {
11
12 static class Inner extends T6521805.Outer {
13
14 Inner(T6521805 t) {
15 t.super();
16 }
17
18 T6521805 this$0 = null;
19
20 public void foo() {
21 this$0 = new T6521805();
22 }
23 }
24
25 class Outer {}
26
27}