File: T6313164.java

package info (click to toggle)
libnb-javaparser-java 9%2B2018-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 65,172 kB
  • sloc: java: 440,096; xml: 6,359; sh: 865; makefile: 314
file content (26 lines) | stat: -rw-r--r-- 916 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * @test /nodynamiccopyright/
 * @bug     6313164 8036953
 * @author mcimadamore
 * @summary  javac generates code that fails byte code verification for the varargs feature
 * @compile/fail/ref=T6313164Source7.out -source 7 -XDrawDiagnostics T6313164.java
 * @compile/fail/ref=T6313164Source8AndHigher.out -XDrawDiagnostics T6313164.java
 */
import p1.*;

class T6313164 {
    {
        B b = new B();
        b.foo1(new B(), new B()); //error - A not accessible
        /*   7  : ok - A not accessible, but foo2(Object...) applicable
         *   8+ : error - A not accessible
         */
        b.foo2(new B(), new B());
        b.foo3(null, null); //error - A (inferred) not accessible
        b.foo4(null, null); //error - A not accesible
        /*   7  : ok - A not accessible, but foo4(Object...) applicable
         *   8+ : error - A not accessible
         */
        b.foo4(new B(), new C());
    }
}