1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/generics/inference/6638712/T6638712e.java Wed Apr 27 01:34:52 2016 +0800 1.3 @@ -0,0 +1,20 @@ 1.4 +/* 1.5 + * @test /nodynamiccopyright/ 1.6 + * @bug 6638712 6795689 1.7 + * @author mcimadamore 1.8 + * @summary Inference with wildcard types causes selection of inapplicable method 1.9 + * @compile/fail/ref=T6638712e.out -XDrawDiagnostics T6638712e.java 1.10 + */ 1.11 + 1.12 +class T6638712e { 1.13 + 1.14 + static class Foo<A, B> { 1.15 + <X> Foo<X, B> m(Foo<? super X, ? extends A> foo) { return null;} 1.16 + } 1.17 + 1.18 + static class Test { 1.19 + Foo<Object, String> test(Foo<Boolean, String> foo1, Foo<Boolean, Boolean> foo2) { 1.20 + return foo1.m(foo2); 1.21 + } 1.22 + } 1.23 +}