test/tools/javac/6521805/T6521805a.java

Mon, 26 Mar 2012 15:28:49 +0100

author
mcimadamore
date
Mon, 26 Mar 2012 15:28:49 +0100
changeset 1239
2827076dbf64
parent 384
ed31953ca025
child 2525
2eb010b6cb22
permissions
-rw-r--r--

7133185: Update 292 overload resolution logic to match JLS
Summary: Re-implement special overload resolution support for method handles according to the JLS SE 7 definition
Reviewed-by: jjg, dlsmith, jrose

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=T6521805a_1.out T6521805a.java -XDrawDiagnostics
mcimadamore@359 8 * @compile/ref=T6521805a_2.out T6521805a.java -XDwarnOnSyntheticConflicts -XDrawDiagnostics
mcimadamore@359 9 */
mcimadamore@359 10
mcimadamore@359 11 class T6521805a {
mcimadamore@359 12
mcimadamore@359 13 static class Outer {
mcimadamore@359 14 T6521805a this$0 = null;
mcimadamore@359 15 }
mcimadamore@359 16
mcimadamore@359 17 public class Inner extends Outer {
mcimadamore@359 18 public void foo() {
mcimadamore@359 19 this$0 = new T6521805a();
mcimadamore@359 20 }
mcimadamore@359 21 }
mcimadamore@359 22 }

mercurial