remove variable: do not leave tailing loops/ifs (IDEA-124489)

This commit is contained in:
Anna Kozlova
2014-06-05 11:45:20 +04:00
parent 83abbd012d
commit 9d5429e77f
3 changed files with 25 additions and 2 deletions
@@ -0,0 +1,9 @@
// "Remove variable 'foo'" "true"
class a {
private int refactorTest(int i) {
int bar = 0;
if (i >0) ;
return bar;
}
}
@@ -0,0 +1,10 @@
// "Remove variable 'foo'" "true"
class a {
private int refactorTest(int i) {
int f<caret>oo = 0;
int bar = 0;
if (i >0) foo++;
return bar;
}
}