Fri, 30 Nov 2012 15:14:48 +0000
8002099: Add support for intersection types in cast expression
Summary: Add parser and type-checking support for intersection types in cast expressions
Reviewed-by: jjg
1 /*
2 * @test /nodynamiccopyright/
3 * @author mcimadamore
4 * @bug 7005671
5 * @summary Generics compilation failure casting List<? extends Set...> to List<Set...>
6 * @compile/fail/ref=T7126754.out -Xlint:unchecked -Werror -XDrawDiagnostics T7126754.java
7 */
9 import java.util.List;
11 class T7126754 {
12 List<? extends List<? extends String>> c = null;
13 List<List<? extends String>> d = (List<List<? extends String>>)c;
14 }