Files
Bas Leijdekkers bd7f1f4270 Java: proper order of 'true' and 'false' in quick-fix name (IDEA-357973)
also fixes internationalization and the incorrect comma in the name
for "Create missing switch branches" quick-fix

GitOrigin-RevId: 16285e054447d8d15318df8889499bbbf91243a7
2024-08-21 09:12:08 +00:00

25 lines
395 B
Java

// "Create missing and 'null' branches" "true-preview"
import org.jetbrains.annotations.Nullable;
class Test {
sealed interface SA permits R1, R2 {
}
record R1() implements SA {
}
record R2() implements SA {
}
public void test(@Nullable SA sa) {
switch (sa) {
case R1 r1 -> {
}
case R2 r2 -> {
}
case null -> {
}
}
}
}