-1:000000000000 | 0:959103a6100f |
---|---|
1 /* | |
2 * @test /nodynamiccopyright/ | |
3 * @bug 8003280 8034223 | |
4 * @summary Add lambda tests | |
5 * Check void-compatibility in strict vs. loose conversion contexts | |
6 * @compile TargetType16.java | |
7 */ | |
8 | |
9 class TargetType16 { | |
10 | |
11 interface SAM1 { | |
12 void m1(); | |
13 } | |
14 | |
15 interface SAM2<X> { | |
16 X m2(); | |
17 } | |
18 | |
19 static void m(SAM1 s1) { } | |
20 static <T> void m(SAM2<T> s2) { } | |
21 | |
22 public static void main(String[] args) { | |
23 m(() -> { throw new AssertionError(); }); // prefer SAM2 | |
24 } | |
25 } |