java create class from usage: disable for expected array type or expected super class while enum/record can't have any

GitOrigin-RevId: 042aed924d9fc35e1ca86ae8660a7a75fe45bd25
This commit is contained in:
Anna Kozlova
2020-10-27 11:21:40 +01:00
committed by intellij-monorepo-bot
parent b1e8b301ee
commit 48a0c3c03c
5 changed files with 54 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
// "Create enum 'Foo'" "true"
public interface Test {
default void foo(java.util.List<? extends Test> l){
if (l.get(0) instanceof Foo) {}
}
}
public enum Foo {}

View File

@@ -0,0 +1,6 @@
// "Create enum 'Foo'" "true"
public interface Test {
default void foo(java.util.List<? extends Test> l){
if (l.get(0) instanceof Fo<caret>o) {}
}
}

View File

@@ -0,0 +1,6 @@
// "Create enum 'Foo'" "false"
public class Test {
void foo(Test s){
if (s instanceof Fo<caret>o) {}
}
}