test for already used var
This commit is contained in:
18
testData/src/pkg/TestInUse.java
Normal file
18
testData/src/pkg/TestInUse.java
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user