Java: Regression test for extracting method from loop body (IDEA-152406)

This commit is contained in:
Pavel Dolgov
2017-06-28 15:41:04 +03:00
parent edab85d266
commit ff879a617e
3 changed files with 32 additions and 0 deletions
@@ -0,0 +1,17 @@
class X {
void foo() {
boolean x = false;
for (int i = 0; i < 100; i++) {
if (newMethod(i)) break;
}
}
private boolean newMethod(int i) {
boolean x;
x = true;
if (i == 30) {
return true;
}
return false;
}
}