test/tools/javac/6521805/T6521805d.java

Tue, 10 Apr 2012 08:15:25 -0700

author
ohair
date
Tue, 10 Apr 2012 08:15:25 -0700
changeset 1244
807ca8ffbeb4
parent 384
ed31953ca025
child 2525
2eb010b6cb22
permissions
-rw-r--r--

7074397: Build infrastructure changes (makefile re-write)
Summary: New makefiles transition, old and new living side by side for now.
Reviewed-by: ohair, jjg, dholmes, ohrstrom, erikj, ihse, tgranat, ykantser
Contributed-by: ohrstrom <fredrik.ohrstrom@oracle.com>, erikj <erik.joelsson@oracle.com>, ihse <magnus.ihse.bursie@oracle.com>, tgranat <torbjorn.granat@oracle.com>, ykantser <yekaterina.kantserova@oracle.com>

     1 /*
     2  * @test /nodynamiccopyright/
     3  * @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  */
    10 class T6521805 {
    12     static class Inner extends T6521805.Outer {
    14         Inner(T6521805 t) {
    15             t.super();
    16         }
    18         T6521805 this$0 = null;
    20         public void foo() {
    21             this$0 = new T6521805();
    22         }
    23     }
    25     class Outer {}
    27 }

mercurial