Thu, 10 Oct 2013 14:58:04 +0200
8001931: The new build system whitespace cleanup
Reviewed-by: tbell, simonis, erikj
aoqi@0 | 1 | /* |
aoqi@0 | 2 | * @test /nodynamiccopyright/ |
aoqi@0 | 3 | * @bug 8003280 |
aoqi@0 | 4 | * @summary Add lambda tests |
aoqi@0 | 5 | * compiler doesn't report accessibility problem due to inaccessible target |
aoqi@0 | 6 | * @compile/fail/ref=TargetType46.out -XDrawDiagnostics TargetType46.java |
aoqi@0 | 7 | */ |
aoqi@0 | 8 | import java.util.*; |
aoqi@0 | 9 | |
aoqi@0 | 10 | class TargetType46Outer { |
aoqi@0 | 11 | |
aoqi@0 | 12 | private interface PI { |
aoqi@0 | 13 | void m(); |
aoqi@0 | 14 | } |
aoqi@0 | 15 | |
aoqi@0 | 16 | void m(PI p) { } |
aoqi@0 | 17 | void m(List<PI> p) { } |
aoqi@0 | 18 | } |
aoqi@0 | 19 | |
aoqi@0 | 20 | class TargetType46 { |
aoqi@0 | 21 | void test(TargetType46Outer outer) { |
aoqi@0 | 22 | outer.m(()->{}); //access error |
aoqi@0 | 23 | outer.m(this::g); //access error |
aoqi@0 | 24 | outer.m(new ArrayList<>()); //ok |
aoqi@0 | 25 | outer.m(Collections.emptyList()); //ok |
aoqi@0 | 26 | } |
aoqi@0 | 27 | |
aoqi@0 | 28 | void g() { } |
aoqi@0 | 29 | } |