File: T6521805a.java

package info (click to toggle)
libnb-javaparser-java 7.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 26,688 kB
  • sloc: java: 189,590; sh: 3,082; xml: 2,085; makefile: 379
file content (22 lines) | stat: -rw-r--r-- 535 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * @test /nodynamiccopyright/
 * @bug 6521805
 * @summary Regression: JDK5/JDK6 javac allows write access to outer class reference
 * @author mcimadamore
 *
 * @compile/fail/ref=T6521805a_1.out T6521805a.java -XDrawDiagnostics
 * @compile/ref=T6521805a_2.out T6521805a.java -XDwarnOnSyntheticConflicts -XDrawDiagnostics
 */

class T6521805a {

    static class Outer {
        T6521805a this$0 = null;
    }

    public class Inner extends Outer {
        public void foo() {
            this$0 = new T6521805a();
        }
    }
}