mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
illegal generic type for instanceof checks (IDEA-76997)
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
class A<T> {
|
||||
public void foo(Object object) {
|
||||
if (object instanceof <error descr="Illegal generic type for instanceof">B</error>) {}
|
||||
if (object instanceof A.B) {}
|
||||
if (object instanceof A<?>.B) {}
|
||||
if (object instanceof A<?>) {}
|
||||
if (object instanceof <error descr="Illegal generic type for instanceof">A<String></error>) {}
|
||||
if (object instanceof A) {}
|
||||
if (object instanceof A[]) {}
|
||||
if (object instanceof <error descr="Illegal generic type for instanceof">B[]</error>) {}
|
||||
if (object instanceof A.B[]) {}
|
||||
}
|
||||
|
||||
private class B {
|
||||
}
|
||||
}
|
||||
|
||||
class A1 {
|
||||
public void foo(Object object) {
|
||||
if (object instanceof B1) {}
|
||||
if (object instanceof A1.B1) {}
|
||||
if (object instanceof B1[]) {}
|
||||
}
|
||||
|
||||
private class B1 {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user