mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
Java: fix "Move into anonymous object" quick fix problems (EA-139632)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// "Move 'x' into anonymous object" "true"
|
||||
class Test {
|
||||
public void test() {
|
||||
var ref = new /*1*/ Object() {
|
||||
int x = 12;
|
||||
};
|
||||
Runnable r = () -> {
|
||||
ref.x++;
|
||||
};s
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Move 'x' into anonymous object" "true"
|
||||
class Test {
|
||||
public void test() {
|
||||
Object ref = new /*1*/ Object() {
|
||||
};
|
||||
int x = 12;
|
||||
Runnable r = () -> {
|
||||
<caret>x++;
|
||||
};s
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ class Test {
|
||||
public void test() {
|
||||
var ref = new Object() {
|
||||
int y = 23;
|
||||
}
|
||||
};
|
||||
int x = 12;
|
||||
Runnable r = () -> {
|
||||
<caret>x++;
|
||||
|
||||
@@ -6,7 +6,7 @@ class Test {
|
||||
// 3
|
||||
int y = 23;
|
||||
//5
|
||||
}
|
||||
};
|
||||
Runnable r = () -> {
|
||||
<caret>x/*7*/++;
|
||||
ref.y++;
|
||||
|
||||
Reference in New Issue
Block a user