1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/lambda/MethodReference53.java Wed Apr 27 01:34:52 2016 +0800 1.3 @@ -0,0 +1,24 @@ 1.4 +/* 1.5 + * @test /nodynamiccopyright/ 1.6 + * @bug 8003280 1.7 + * @summary Add lambda tests 1.8 + * the case in which no member reference is found is now treated as a normal error (not dependent on target-type) 1.9 + * @compile/fail/ref=MethodReference53.out -XDrawDiagnostics MethodReference53.java 1.10 + */ 1.11 +class MethodReference53 { 1.12 + 1.13 + interface SAM1 { 1.14 + void m(int i); 1.15 + } 1.16 + 1.17 + interface SAM2 { 1.18 + void m(long i); 1.19 + } 1.20 + 1.21 + void m(SAM1 s1) { } 1.22 + void m(SAM2 s1) { } 1.23 + 1.24 + void test() { 1.25 + m(this::unknown); //should not generate outer resolution diagnostic 1.26 + } 1.27 +}