unbound wildcard is not provably distinct from any array type (IDEA-63447)

This commit is contained in:
anna
2010-12-22 17:13:51 +03:00
parent e8ce6ad5fa
commit 4b793a4f9f
2 changed files with 24 additions and 0 deletions
@@ -475,6 +475,27 @@ public class Test {
}
}
}
//IDEA-63447
void testUnboundWildcardWithArrayTypes() {
class IUWWAT{
private <T> void method1(T[][] matrix) {
final Class<T[]> type = (Class<T[]>) matrix.getClass().getComponentType();
}
private <T> void method2(T[][] matrix) {
final Class<Object> type = (Class<Object>) matrix.getClass().getComponentType();
}
private <T> void method3(T[][] matrix) {
final Class<Object[]> type = (Class<Object[]>) matrix.getClass().getComponentType();
}
private <T> void method4(T[][] matrix) {
final Class<Object[][]> type = (Class<Object[][]>) matrix.getClass().getComponentType();
}
}
}
}
class W<T> {}