equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * @test /nodynamiccopyright/ |
2 * @test /nodynamiccopyright/ |
3 * @bug 8066974 |
3 * @bug 8066974 8062373 |
4 * @summary Compiler doesn't infer method's generic type information in lambda body |
4 * @summary Compiler doesn't infer method's generic type information in lambda body |
5 * @compile/fail/ref=T8066974.out -XDrawDiagnostics T8066974.java |
5 * @compile/fail/ref=T8066974.out -XDrawDiagnostics T8066974.java |
6 */ |
6 */ |
7 class T8066974 { |
7 class T8066974 { |
8 static class Throwing<E extends Throwable> { } |
8 static class Throwing<E extends Throwable> { } |
32 |
32 |
33 void testRuntime(RuntimeThrowing rt) { |
33 void testRuntime(RuntimeThrowing rt) { |
34 map(p->p.m(rt)); |
34 map(p->p.m(rt)); |
35 map(mapper(rt)); |
35 map(mapper(rt)); |
36 map(new ThrowingMapper<>(rt)); |
36 map(new ThrowingMapper<>(rt)); |
|
37 map(new ThrowingMapper<>(rt) {}); |
37 } |
38 } |
38 |
39 |
39 void testChecked(CheckedThrowing ct) { |
40 void testChecked(CheckedThrowing ct) { |
40 map(p->p.m(ct)); |
41 map(p->p.m(ct)); |
41 map(mapper(ct)); |
42 map(mapper(ct)); |
42 map(new ThrowingMapper<>(ct)); |
43 map(new ThrowingMapper<>(ct)); |
|
44 map(new ThrowingMapper<>(ct) {}); |
43 } |
45 } |
44 } |
46 } |