Thu, 21 Feb 2013 14:43:51 -0800
8008405: Now that metafactory is in place, add javac lambda serialization tests
Summary: Tests part of original langtools serialization review.
Reviewed-by: mcimadamore
aoqi@0 | 1 | /* |
aoqi@0 | 2 | * @test /nodynamiccopyright/ |
aoqi@0 | 3 | * @bug 7097436 |
aoqi@0 | 4 | * @summary ClassCastException occurs in assignment expressions without any heap pollutions |
aoqi@0 | 5 | * @compile/fail/ref=T7097436.out -Xlint:varargs -Werror -XDrawDiagnostics T7097436.java |
aoqi@0 | 6 | */ |
aoqi@0 | 7 | |
aoqi@0 | 8 | import java.util.List; |
aoqi@0 | 9 | |
aoqi@0 | 10 | class T7097436 { |
aoqi@0 | 11 | @SafeVarargs |
aoqi@0 | 12 | static void m(List<String>... ls) { |
aoqi@0 | 13 | Object o = ls; //warning |
aoqi@0 | 14 | Object[] oArr = ls; //warning |
aoqi@0 | 15 | String s = ls; // no warning |
aoqi@0 | 16 | Integer[] iArr = ls; // no warning |
aoqi@0 | 17 | } |
aoqi@0 | 18 | } |