Parameter mapping fixed in case if two vars introduced

This commit is contained in:
Tagir Valeev
2019-04-19 15:02:32 +07:00
parent 723c055455
commit 3345967b85
4 changed files with 63 additions and 18 deletions
@@ -0,0 +1,16 @@
class A {
String foo(int i) {
if (i > 0) {
if (i == 10) return null;
System.out.println(i);
}
return String.valueOf(i);
}
void bar(int x) {
if (x > 0) {
System.out.println(f<caret>oo(x));
}
System.out.println("x < 0");
}
}
@@ -0,0 +1,21 @@
class A {
void bar(int x) {
if (x > 0) {
String result = null;
boolean finished = false;
if (x > 0) {
if (x == 10) {
finished = true;
} else {
System.out.println(x);
}
}
if (!finished) {
result = String.valueOf(x);
}
System.out.println(result);
}
System.out.println("x < 0");
}
}