File: T7086601a.java

package info (click to toggle)
libnb-javaparser-java 9%2B2018-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 65,320 kB
  • sloc: java: 440,096; xml: 6,359; sh: 865; makefile: 314
file content (34 lines) | stat: -rw-r--r-- 978 bytes parent folder | download | duplicates (19)
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
27
28
29
30
31
32
33
34
/**
 * @test /nodynamiccopyright/
 * @bug 7086601
 * @summary Error message bug: cause for method mismatch is 'null'
 * @compile/fail/ref=T7086601a.out -XDrawDiagnostics T7086601a.java
 */

class T7086601 {
    static <S> void m1(Iterable<? super S> s1, Iterable<? super S> s2) { }
    static void m1(Object o) {}

    static <S> void m2(Iterable<? super S> s1, Iterable<? super S> s2, Iterable<? super S> s3) { }
    static void m2(Object o) {}

    @SafeVarargs
    static <S> void m3(Iterable<? super S>... ss) { }
    static void m3(Object o) {}

    static void test1(Iterable<String> is, Iterable<Integer> ii) {
        m1(is, ii);
    }

    static void test2(Iterable<String> is, Iterable<Integer> ii, Iterable<Double> id) {
        m2(is, ii, id);
    }

    static void test3(Iterable<String> is, Iterable<Integer> ii) {
        m3(is, ii);
    }

    static void test4(Iterable<String> is, Iterable<Integer> ii, Iterable<Double> id) {
        m3(is, ii, id);
    }
}