[java-completion] IJ-CR-111599 IDEA-324653 Completion for objects with enums. Add test that it doesn't work for old Java

GitOrigin-RevId: 32b02cb0092b53093cf63dbea95df0c2e2e74724
This commit is contained in:
Mikhail Pyltsin
2023-07-21 15:54:19 +00:00
committed by intellij-monorepo-bot
parent ec5af74d07
commit dcd9e3d954
3 changed files with 27 additions and 1 deletions
@@ -0,0 +1,11 @@
class Main {
public enum En {
HHHH
}
public void foo(Object o) {
switch (o) {
case En.HH<caret>
}
}}
@@ -0,0 +1,11 @@
class Main {
public enum En {
HHHH
}
public void foo(Object o) {
switch (o) {
case En.HH<caret>
}
}}
@@ -87,8 +87,12 @@ public class NormalSwitchCompletionTest extends NormalCompletionTestCase {
public void testQualifierEnumConstantInSwitch4() { doTest(); }
@NeedsIndex.ForStandardLibrary
public void testQualifierEnumConstantInSwitchWithObject() { doTest(); }
@NeedsIndex.ForStandardLibrary
public void testQualifierEnumConstantInSwitchWithObjectInJava20() {
IdeaTestUtil.withLevel(myFixture.getModule(), LanguageLevel.JDK_20, () -> doTest());
}
public void testQualifierEnumConstantInSwitchInJava20() {
IdeaTestUtil.withLevel(myFixture.getModule(), LanguageLevel.JDK_19, () -> doTest());
IdeaTestUtil.withLevel(myFixture.getModule(), LanguageLevel.JDK_20, () -> doTest());
}
public void testClassPatternInSwitch1() { doTest(); }
public void testClassPatternInSwitch2() { doTest(); }