[java-refactoring] Test for EA-882906 fix

GitOrigin-RevId: 085064379eed4ac2c1c0022724ac1fb4f71b5d15
This commit is contained in:
Tagir Valeev
2023-10-12 18:24:24 +00:00
committed by intellij-monorepo-bot
parent 5b0752f442
commit 3fb3c93d3d
3 changed files with 42 additions and 0 deletions
@@ -0,0 +1,20 @@
class Of {
private int i = 0;
public static void main(String[] args) {
Of inlineMethods = new Of();
inlineMethods.test();
inlineMethods.test2();
}
private void test() {
this.test2();
}
private void te<caret>st2() {
int i1 = this.i;
this.i = 2;
System.out.println(i1);
this.test();
}
}
@@ -0,0 +1,20 @@
class Of {
private int i = 0;
public static void main(String[] args) {
Of inlineMethods = new Of();
inlineMethods.test();
int i1 = inlineMethods.i;
inlineMethods.i = 2;
System.out.println(i1);
inlineMethods.test();
}
private void test() {
int i1 = this.i;
this.i = 2;
System.out.println(i1);
this.test();
}
}
@@ -576,6 +576,8 @@ public class InlineMethodTest extends LightRefactoringTestCase {
public void testNewWithSideEffect() { doTest(); }
public void testSplitIfAndCollapseBack() { doTest(); }
public void testThisVariableName() { doTest(); }
@Override
protected Sdk getProjectJDK() {