mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-30 20:05:16 +07:00
GitOrigin-RevId: 55ef9a7d7fa7b96a8f54e91801060b7c3d44dd65
18 lines
415 B
Java
18 lines
415 B
Java
public class WithoutConflictsSwitchExtendedDeconstruction {
|
|
public static void main(String[] args) {
|
|
final Point point = new Point(199);
|
|
point.foo(point);
|
|
}
|
|
public record Point(int a) {
|
|
void foo(Object obj) {
|
|
switch (obj) {
|
|
case Point(int x) -> {
|
|
System.out.println("1");
|
|
}
|
|
default -> {
|
|
System.out.println("default");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |