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
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 7097436
4 * @summary ClassCastException occurs in assignment expressions without any heap pollutions
5 * @compile/fail/ref=T7097436.out -Xlint:varargs -Werror -XDrawDiagnostics T7097436.java
6 */
8 import java.util.List;
10 class T7097436 {
11 @SafeVarargs
12 static void m(List<String>... ls) {
13 Object o = ls; //warning
14 Object[] oArr = ls; //warning
15 String s = ls; // no warning
16 Integer[] iArr = ls; // no warning
17 }
18 }