Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMissingSealedClassSwitchBranches/afterDominatingPatternPresent.java
Andrey.Cherkasov 086e760e08 [java-highlighting] Fix bug about applying "Create missing switch branch" fix produces a red code
(IDEA-278884)

GitOrigin-RevId: 690fa0ae782ee065b35e91f6d1e0df846bd9369f
2021-11-11 07:03:04 +00:00

18 lines
345 B
Java

// "Create missing switch branch 'Sub1'" "true"
sealed interface I {}
sealed interface J extends I {}
final class Sub1 implements I, J {}
final class Sub2 implements I {}
class Test {
void test(I i) {
switch (i) {
case Sub2 sub2:
break;
case Sub1 sub1:
break;
case J j:
break;
}
}
}