mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
unbound wildcard is not provably distinct from any array type (IDEA-63447)
This commit is contained in:
+21
@@ -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> {}
|
||||
|
||||
Reference in New Issue
Block a user