mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Java: Preserve comment from removed redundant variable (IDEA-182669)
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
// "Move 'return' closer to computation of the value of 'n'" "true"
|
||||
class T {
|
||||
int f(int k) {
|
||||
if (k == 1)
|
||||
return 1;
|
||||
return /*comment1*/ -1;
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Move 'return' closer to computation of the value of 'n'" "true"
|
||||
class T {
|
||||
int f(int k) {
|
||||
if (k == 1)
|
||||
return 1;
|
||||
else if (k == 2)
|
||||
return /*comment1*/ -1;
|
||||
else if (k == 3)
|
||||
return 3;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Move 'return' closer to computation of the value of 'n'" "true"
|
||||
class T {
|
||||
int f(int k) {
|
||||
int n = /*comment1*/-1;
|
||||
if (k == 1)
|
||||
n = 1;
|
||||
<caret>return n;
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Move 'return' closer to computation of the value of 'n'" "true"
|
||||
class T {
|
||||
int f(int k) {
|
||||
int n = /*comment1*/-1;
|
||||
if (k == 1)
|
||||
n = 1;
|
||||
else if (k == 2)
|
||||
return n;
|
||||
else if (k == 3)
|
||||
return 3;
|
||||
<caret>return n;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user