Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMissingSealedClassSwitchBranches/afterIdenticalGuardedPatterns.java
Tagir Valeev dd689d3a39 [java-inspections] More tests for preview
GitOrigin-RevId: 6b6405ee4491ad1d58947547c40df6fb2d291ab7
2022-07-29 17:54:59 +00:00

17 lines
422 B
Java

// "Create missing switch branch 'Sub1'" "true-preview"
sealed interface I {}
final class Sub1 implements I {}
final class Sub2 implements I {}
class Test {
void test(I i) {
switch (i) {
case Sub1 sub1 && Math.random() > 0.5 -> {}
case Sub1 sub1 && Math.random() > 0.1 -> {}
case Sub1 sub1 && Math.random() > 0.5 -> {}
case Sub1 sub1 -> {
}
case Sub2 sub2 -> {}
}
}
}