Files
Tagir Valeevandintellij-monorepo-bot 623ee94480 [java-inspections] DuplicateBranchesInSwitchInspection improvements
1. Do not merge pattern with non-pattern branch
2. Colon labels with guards should not be merged into a single label
Leftovers after IDEA-326939

GitOrigin-RevId: 9fc54e643eda666771af2fc017dbef7d925dd76b
2023-09-19 01:24:53 +00:00

24 lines
391 B
Java

// "Merge with 'case E.A'" "false"
interface Something {
}
enum E implements Something {A, B,}
record P(String s) implements Something {
}
class Test {
public static void main(String[] args) {
}
public int main1(Something something) {
return switch (something) {
case E.A: yield 1;
case P(_) : yield<caret> 1;
default: {
yield 2;
}
};
}
}