test/tools/javac/Diagnostics/6862608/T6862608a.java

changeset 0
959103a6100f
child 2525
2eb010b6cb22
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/tools/javac/Diagnostics/6862608/T6862608a.java	Wed Apr 27 01:34:52 2016 +0800
     1.3 @@ -0,0 +1,21 @@
     1.4 +/**
     1.5 + * @test /nodynamiccopyright/
     1.6 + * @bug     6862608
     1.7 + * @summary rich diagnostic sometimes contain wrong type variable numbering
     1.8 + * @author  mcimadamore
     1.9 + * @compile/fail/ref=T6862608a.out -XDrawDiagnostics -XDdiags=disambiguateTvars,where T6862608a.java
    1.10 + */
    1.11 +
    1.12 +
    1.13 +import java.util.*;
    1.14 +
    1.15 +class T6862608a {
    1.16 +
    1.17 +    <T> Comparator<T> compound(Iterable<? extends Comparator<? super T>> it) {
    1.18 +        return null;
    1.19 +    }
    1.20 +
    1.21 +    public void test(List<Comparator<?>> x) {
    1.22 +        Comparator<String> c3 = compound(x);
    1.23 +    }
    1.24 +}

mercurial