test/tools/javac/varargs/6313164/T6313164.java

changeset 845
5a43b245aed1
parent 0
959103a6100f
child 2531
fc2a01ba3d79
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/tools/javac/varargs/6313164/T6313164.java	Fri Jan 28 12:03:49 2011 +0000
     1.3 @@ -0,0 +1,18 @@
     1.4 +/*
     1.5 + * @test /nodynamiccopyright/
     1.6 + * @bug     6313164
     1.7 + * @author mcimadamore
     1.8 + * @summary  javac generates code that fails byte code verification for the varargs feature
     1.9 + * @compile/fail/ref=T6313164.out -XDrawDiagnostics T6313164.java
    1.10 + */
    1.11 +import p1.*;
    1.12 +
    1.13 +class T6313164 {
    1.14 +    { B b = new B();
    1.15 +      b.foo1(new B(), new B()); //error - A not accesible
    1.16 +      b.foo2(new B(), new B()); //ok - A not accessible, but foo2(Object...) applicable
    1.17 +      b.foo3(null, null); //error - A (inferred) not accesible
    1.18 +      b.foo4(null, null); //error - A (inferred in 15.12.2.8 - no resolution backtrack) not accesible
    1.19 +      b.foo4(new B(), new C()); //ok - A (inferred in 15.12.2.7) not accessible, but foo4(Object...) applicable
    1.20 +    }
    1.21 +}

mercurial