langtools/test/tools/javac/6521805/T6521805d.java
author mikejwre
Wed, 09 Jun 2010 18:56:41 -0700
changeset 5634 895b66935810
parent 3766 7e2df99e9223
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3557
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
     1
/*
3766
7e2df99e9223 6875336: some tests should use /nodynamiccopyright/
jjg
parents: 3557
diff changeset
     2
 * @test /nodynamiccopyright/
3557
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
     3
 * @bug 6521805
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
     4
 * @summary Regression: JDK5/JDK6 javac allows write access to outer class reference
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
     5
 * @author mcimadamore
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
     6
 *
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
     7
 * @compile/fail/ref=T6521805d.out T6521805d.java -XDrawDiagnostics
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
     8
 */
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
     9
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    10
class T6521805 {
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    11
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    12
    static class Inner extends T6521805.Outer {
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    13
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    14
        Inner(T6521805 t) {
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    15
            t.super();
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    16
        }
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    17
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    18
        T6521805 this$0 = null;
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    19
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    20
        public void foo() {
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    21
            this$0 = new T6521805();
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    22
        }
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    23
    }
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    24
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    25
    class Outer {}
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    26
a803afefa115 6521805: Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore
parents:
diff changeset
    27
}