Mon, 21 Jan 2013 11:16:28 -0800
Merge
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 8003280
4 * @summary Add lambda tests
5 * check strict method conversion does not allow loose method reference conversion
6 * @compile/fail/ref=MethodReference26.out -XDrawDiagnostics MethodReference26.java
7 */
9 class MethodReference26 {
11 static void m(Integer i) { }
13 interface SAM {
14 void m(int x);
15 }
17 static void call(int i, SAM s) { }
18 static void call(Integer i, SAM s) { }
20 static void test() {
21 call(1, MethodReference26::m); //ambiguous
22 }
23 }