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 | * check that javac recovers succesfully from bad cast conversion to primitive type |
aoqi@0 | 6 | * @compile/fail/ref=TargetType17.out -XDrawDiagnostics TargetType17.java |
aoqi@0 | 7 | */ |
aoqi@0 | 8 | |
aoqi@0 | 9 | class TargetType17 { |
aoqi@0 | 10 | interface SAM<X> { |
aoqi@0 | 11 | boolean m(X x); |
aoqi@0 | 12 | } |
aoqi@0 | 13 | |
aoqi@0 | 14 | byte b = (byte) ()-> true; |
aoqi@0 | 15 | short s = (short) ()-> 1; |
aoqi@0 | 16 | int i = (int) ()-> 1; |
aoqi@0 | 17 | long l = (long) ()-> 1L; |
aoqi@0 | 18 | float f = (float) ()-> 1.0F; |
aoqi@0 | 19 | double d = (double) ()-> 1.0; |
aoqi@0 | 20 | char c = (char) ()-> 'c'; |
aoqi@0 | 21 | boolean z = (boolean) ()-> true; |
aoqi@0 | 22 | } |