test/tools/javac/6521805/T6521805d.java

Thu, 07 Jun 2012 20:30:57 -0700

author
erikj
date
Thu, 07 Jun 2012 20:30:57 -0700
changeset 1273
ac29cc95b5c5
parent 384
ed31953ca025
child 2525
2eb010b6cb22
permissions
-rw-r--r--

7170079: Adjustments to build-infra makefiles
Reviewed-by: ohair, ohrstrom, ihse, jonas
Contributed-by: jonas <jonas.oreland@oracle.com>, erikj <erik.joelsson@oracle.com>, ihse <magnus.ihse.bursie@oracle.com>, tgranat <torbjorn.granat@oracle.com>, ykantser <yekaterina.kantserova@oracle.com>

mcimadamore@359 1 /*
jjg@384 2 * @test /nodynamiccopyright/
mcimadamore@359 3 * @bug 6521805
mcimadamore@359 4 * @summary Regression: JDK5/JDK6 javac allows write access to outer class reference
mcimadamore@359 5 * @author mcimadamore
mcimadamore@359 6 *
mcimadamore@359 7 * @compile/fail/ref=T6521805d.out T6521805d.java -XDrawDiagnostics
mcimadamore@359 8 */
mcimadamore@359 9
mcimadamore@359 10 class T6521805 {
mcimadamore@359 11
mcimadamore@359 12 static class Inner extends T6521805.Outer {
mcimadamore@359 13
mcimadamore@359 14 Inner(T6521805 t) {
mcimadamore@359 15 t.super();
mcimadamore@359 16 }
mcimadamore@359 17
mcimadamore@359 18 T6521805 this$0 = null;
mcimadamore@359 19
mcimadamore@359 20 public void foo() {
mcimadamore@359 21 this$0 = new T6521805();
mcimadamore@359 22 }
mcimadamore@359 23 }
mcimadamore@359 24
mcimadamore@359 25 class Outer {}
mcimadamore@359 26
mcimadamore@359 27 }

mercurial