Wed, 27 Apr 2016 01:34:52 +0800
Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/langtools/
changeset: 2573:53ca196be1ae
tag: jdk8u25-b17
aoqi@0 | 1 | /* |
aoqi@0 | 2 | * @test /nodynamiccopyright/ |
aoqi@0 | 3 | * @bug 6313164 |
aoqi@0 | 4 | * @author mcimadamore |
aoqi@0 | 5 | * @summary javac generates code that fails byte code verification for the varargs feature |
aoqi@0 | 6 | * @compile/fail/ref=T6313164.out -XDrawDiagnostics T6313164.java |
aoqi@0 | 7 | */ |
aoqi@0 | 8 | import p1.*; |
aoqi@0 | 9 | |
aoqi@0 | 10 | class T6313164 { |
aoqi@0 | 11 | { B b = new B(); |
aoqi@0 | 12 | b.foo1(new B(), new B()); //error - A not accesible |
aoqi@0 | 13 | b.foo2(new B(), new B()); //ok - A not accessible, but foo2(Object...) applicable |
aoqi@0 | 14 | b.foo3(null, null); //error - A (inferred) not accesible |
aoqi@0 | 15 | b.foo4(null, null); //error - A (inferred in 15.12.2.8 - no resolution backtrack) not accesible |
aoqi@0 | 16 | b.foo4(new B(), new C()); //ok - A (inferred in 15.12.2.7) not accessible, but foo4(Object...) applicable |
aoqi@0 | 17 | } |
aoqi@0 | 18 | } |