1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/lambda/MethodReference69.java Wed Jul 17 14:09:46 2013 +0100 1.3 @@ -0,0 +1,21 @@ 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=MethodReference69.out -XDrawDiagnostics MethodReference69.java 1.9 + */ 1.10 +class MethodReference69 { 1.11 + interface F<X> { 1.12 + String m(Integer x1, X x2); 1.13 + } 1.14 + 1.15 + static class Foo { 1.16 + String getNameAt(Integer i) { return ""; } 1.17 + } 1.18 + 1.19 + <Z> void g(F<Z> fz) { } 1.20 + 1.21 + void test() { 1.22 + g(Foo::getName); 1.23 + } 1.24 +}