Thu, 10 Oct 2013 14:58:04 +0200
8001931: The new build system whitespace cleanup
Reviewed-by: tbell, simonis, erikj
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 8003280
4 * @summary Add lambda tests
5 * check that generic method reference is inferred when type parameters are omitted
6 * @compile/fail/ref=MethodReference47.out -XDrawDiagnostics MethodReference47.java
7 */
8 public class MethodReference47 {
10 interface SAM1 {
11 void m(Integer s);
12 }
14 interface SAM2 {
15 void m(Integer s);
16 }
18 static class Foo<X extends Number> {
19 Foo(X x) { }
20 }
22 static <X extends Number> void m(X fx) { }
24 static void g1(SAM1 s) { }
25 static void g2(SAM1 s) { }
26 static void g2(SAM2 s) { }
28 public static void main(String[] args) {
29 g1(MethodReference47::m);
30 g2(MethodReference47::m);
31 }
32 }