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 void-compatibility in strict vs. loose conversion contexts
6 * @compile/fail/ref=TargetType16.out -XDrawDiagnostics TargetType16.java
7 */
9 class TargetType16 {
11 interface SAM1 {
12 void m1();
13 }
15 interface SAM2<X> {
16 X m2();
17 }
19 static void m(SAM1 s1) { }
20 static <T> void m(SAM2<T> s2) { }
22 public static void main(String[] args) {
23 m(() -> { throw new AssertionError(); }); //ambiguous
24 }
25 }