1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/lambda/MethodReference72.java Wed Jul 17 14:09:46 2013 +0100 1.3 @@ -0,0 +1,20 @@ 1.4 +/* 1.5 + * @test /nodynamiccopyright/ 1.6 + * @bug 8016175 1.7 + * @summary Add bottom-up type-checking support for unambiguous method references 1.8 + * @compile/fail/ref=MethodReference72.out -XDrawDiagnostics MethodReference72.java 1.9 + */ 1.10 +class MethodReference72 { 1.11 + interface F<X> { 1.12 + @SuppressWarnings("unchecked") 1.13 + void m(X... x); 1.14 + } 1.15 + 1.16 + void m1(Integer i) { } 1.17 + 1.18 + <Z> void g(F<Z> f) { } 1.19 + 1.20 + void test() { 1.21 + g(this::m1); //? 1.22 + } 1.23 +}