test/tools/javac/generics/inference/6638712/T6638712e.java

Thu, 31 Aug 2017 15:17:03 +0800

author
aoqi
date
Thu, 31 Aug 2017 15:17:03 +0800
changeset 2525
2eb010b6cb22
parent 384
ed31953ca025
parent 0
959103a6100f
permissions
-rw-r--r--

merge

aoqi@0 1 /*
aoqi@0 2 * @test /nodynamiccopyright/
aoqi@0 3 * @bug 6638712 6795689
aoqi@0 4 * @author mcimadamore
aoqi@0 5 * @summary Inference with wildcard types causes selection of inapplicable method
aoqi@0 6 * @compile/fail/ref=T6638712e.out -XDrawDiagnostics T6638712e.java
aoqi@0 7 */
aoqi@0 8
aoqi@0 9 class T6638712e {
aoqi@0 10
aoqi@0 11 static class Foo<A, B> {
aoqi@0 12 <X> Foo<X, B> m(Foo<? super X, ? extends A> foo) { return null;}
aoqi@0 13 }
aoqi@0 14
aoqi@0 15 static class Test {
aoqi@0 16 Foo<Object, String> test(Foo<Boolean, String> foo1, Foo<Boolean, Boolean> foo2) {
aoqi@0 17 return foo1.m(foo2);
aoqi@0 18 }
aoqi@0 19 }
aoqi@0 20 }

mercurial