equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * @test /nodynamiccopyright/ |
2 * @test /nodynamiccopyright/ |
3 * @bug 8003280 8075184 |
3 * @bug 8003280 8075184 8081271 |
4 * @summary Add lambda tests |
4 * @summary Add lambda tests |
5 * check that pair of bound/non-bound constructor references is flagged as ambiguous |
5 * check that pair of bound/non-bound constructor references is flagged as ambiguous |
6 * @author Maurizio Cimadamore |
6 * @author Maurizio Cimadamore |
7 * @compile/fail/ref=MethodReference23.out -XDrawDiagnostics MethodReference23.java |
7 * @compile/fail/ref=MethodReference23.out -XDrawDiagnostics MethodReference23.java |
8 */ |
8 */ |
47 static void call3(SAM12 s) { } |
47 static void call3(SAM12 s) { } |
48 static void call3(SAM21 s) { } |
48 static void call3(SAM21 s) { } |
49 static void call3(SAM22 s) { } |
49 static void call3(SAM22 s) { } |
50 |
50 |
51 static void test11() { |
51 static void test11() { |
52 SAM11 s = MethodReference23.Inner1::new; //ok |
52 SAM11 s = MethodReference23.Inner1::new; // fail. |
53 call11(MethodReference23.Inner1::new); //ok |
53 call11(MethodReference23.Inner1::new); // fail. |
54 } |
54 } |
55 |
55 |
56 static void test12() { |
56 static void test12() { |
57 SAM12 s = MethodReference23.Inner1::new; //fail |
57 SAM12 s = MethodReference23.Inner1::new; //fail |
58 call12(MethodReference23.Inner1::new); //fail |
58 call12(MethodReference23.Inner1::new); //fail |