Files
openide/java/java-tests/testData/inspection/duplicateBranchesInSwitchFix/afterMergeWithDefault3.java
2023-01-15 05:39:32 +00:00

15 lines
305 B
Java

// "Merge with the default 'switch' branch" "GENERIC_ERROR_OR_WARNING"
class Test {
record R() {}
record S() {}
void foo(Object obj) {
switch (obj) {
case R():
case S():
case null, default:
System.out.println(42);
}
}
}