Files
Andrey Cherkasovandintellij-monorepo-bot 4cd808e3b0 [java-inspections] DuplicateBranchesInSwitch: fix a comment
IJ-CR-101312

GitOrigin-RevId: 11e80499c55677cea9ba2c2c3d1dc0dd0f83124d
2023-03-01 18:12:37 +00:00

17 lines
332 B
Java

// "Delete redundant 'switch' branch" "GENERIC_ERROR_OR_WARNING"
class Test {
record R() {}
record S() {}
void foo(Object obj) {
switch (obj) {
case null:
return 42;
case String s:
return 0;
default:
return 42;
}
}
}