mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-05 15:50:49 +07:00
- preserve guards for patterns - preserve comma-style for unnamed patterns GitOrigin-RevId: c306280bded29ac3b6acb88b0ef6071bf50fefcb
14 lines
330 B
Java
14 lines
330 B
Java
// "Replace with old style 'switch' statement" "true-preview"
|
|
|
|
class GuardedExpressions {
|
|
void foo2(Object o) {
|
|
switch (o) {
|
|
case Integer s when s.hashCode() == 1:
|
|
System.out.println(1);
|
|
break;
|
|
default:
|
|
System.out.println(2);
|
|
break;
|
|
}
|
|
}
|
|
} |