Mon, 23 Sep 2013 17:27:38 +0400
7154966: CRs found to be in Fixed state with no test and no noreg- keyword.
Reviewed-by: ksrini
1 /**
2 * @test /nodynamiccopyright/
3 * @bug 8012003
4 * @summary Method diagnostics resolution need to be simplified in some cases
5 * test lambda-related overload resolution simplifications
6 * @compile/fail/ref=T8012003b.out -XDrawDiagnostics -Xdiags:compact T8012003b.java
7 */
9 class T8012003b {
11 interface Consumer_V<X> {
12 void m(X x);
13 }
15 interface Consumer_NV<X> {
16 Integer m(X x);
17 }
19 void m1(Runnable r) { }
20 void m1(Runnable r, String s) { }
22 void m2(Consumer_V<Integer> ci) { }
24 void m3(Consumer_NV<String> ci) { }
26 void g(String arg) { }
27 String g2(String arg) { return arg; }
29 void test() {
30 m1(this::g);
31 m1(()->1);
32 m1(()->false ? "" : "");
33 m2(this::g);
34 m3(this::g2);
35 m3(this::k);
36 }
37 }