Files
Mikhail Pyltsinandintellij-monorepo-bot 852b99222d [java-inspections] IDEA-335728 Duplicate branches can't be merge in switch
- added condition for available feature

GitOrigin-RevId: a8ae325cdd2843a932bf03fc535505a41865a9fb
2023-10-20 14:12:37 +00:00

17 lines
398 B
Java

// "Merge with 'case Integer _'" "true-preview"
class C {
void foo2(Object o) {
switch (o) {
case Integer _, StringBuffer _ when o.hashCode()==1:
case String _:
System.out.println("hello");
break;
case CharSequence _:
System.out.println("hello3");
break;
default:
System.out.println("hello2");
break;
}
}
}