Files
Tagir Valeev bd411cb482 [java-refactoring] Inline method: do not inline parameters that have non-pure method call in initializer
To compensate somewhat, inline parameters that are executed as the first expression inside the method (or previous expressions are harmless)

GitOrigin-RevId: ff4bc5ce45bfb3e12a83dc8ccb97b1767558bcbe
2022-10-07 17:17:52 +00:00

21 lines
371 B
Java

public class Foo {
public static void main(String[] args) {
<caret>foo(new X());
}
static void foo(X x) {
System.out.println(1);
System.out.println(x);
}
static class X {
X() {
System.out.println(0);
}
@Override
public String toString() {
return "2";
}
}
}