Files
openide/java/java-tests/testData/refactoring/extractMethodAndDuplicatesInplace/IntroduceObjectFailedWithAssignment1.java
Alexandr Suhinin 9ac124a247 [extract method with object] show error when variables can not be extracted
GitOrigin-RevId: 3be26214e06d11a2ce42ff5ddb89be146d338d47
2023-01-30 21:35:36 +00:00

14 lines
228 B
Java

public class Test {
void test(boolean p) {
<selection>int x = 42;
int y = 0;
System.out.println();</selection>
if (p) {
x = (x + y)/2;
}
System.out.println("Point(" + x + ", " + y + ")");
}
}