mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 17:20:54 +07:00
16 lines
330 B
Java
16 lines
330 B
Java
// "Move 'x' into anonymous object" "true-preview"
|
|
class Test {
|
|
public void test() {
|
|
var /*1*/ ref /*4*/ = new Object() {
|
|
int /*6*/ x = 12;//2
|
|
// 3
|
|
int y = 23;
|
|
//5
|
|
};
|
|
Runnable r = () -> {
|
|
ref.x/*7*/++;
|
|
ref.y++;
|
|
};
|
|
}
|
|
}
|