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 | * most specific resolution crashes on stuck lambdas |
aoqi@0 | 6 | * @compile/fail/ref=MostSpecific06.out -XDrawDiagnostics MostSpecific06.java |
aoqi@0 | 7 | */ |
aoqi@0 | 8 | import java.util.*; |
aoqi@0 | 9 | |
aoqi@0 | 10 | class MostSpecific06 { |
aoqi@0 | 11 | |
aoqi@0 | 12 | interface Predicate<X> { |
aoqi@0 | 13 | boolean accept(X x); |
aoqi@0 | 14 | } |
aoqi@0 | 15 | |
aoqi@0 | 16 | interface ExtPredicate<X> extends Predicate<X> { } |
aoqi@0 | 17 | |
aoqi@0 | 18 | |
aoqi@0 | 19 | |
aoqi@0 | 20 | void test(boolean cond, ArrayList<String> als) { |
aoqi@0 | 21 | m(u -> true, als, als); |
aoqi@0 | 22 | m((u -> true), als, als); |
aoqi@0 | 23 | m(cond ? u -> true : u -> false, als, als); |
aoqi@0 | 24 | } |
aoqi@0 | 25 | |
aoqi@0 | 26 | <U> U m(Predicate<U> p, List<U> lu, ArrayList<U> au) { return null; } |
aoqi@0 | 27 | |
aoqi@0 | 28 | |
aoqi@0 | 29 | <U> U m(ExtPredicate<U> ep, ArrayList<U> au, List<U> lu) { return null; } |
aoqi@0 | 30 | } |