mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
14 lines
245 B
Java
14 lines
245 B
Java
// "Replace with record pattern" "true-preview"
|
|
class X {
|
|
record Point(int x, int y) {
|
|
}
|
|
|
|
void test(Object obj) {
|
|
int x = 0;
|
|
int y = 0;
|
|
if (obj instanceof Point(int x1, int y1)) {
|
|
System.out.println(x1 + y1);
|
|
}
|
|
}
|
|
}
|