test for already used var

This commit is contained in:
Egor.Ushakov
2017-04-27 20:11:24 +03:00
parent 4de826363f
commit 645b38d638
4 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package pkg;
public class TestInUse {
public int getInt() {
return 42;
}
protected int reuse() {
int i = 0, d = 0;
int result = 0;
do {
d = getInt();
result -= d;
}
while (++i < 10);
return result;
}
}