void () { doTest( """ class X implements AutoCloseable { @Override public void close() {} private static X example(boolean cond, X other) { X x; if (cond) { x = new X(); } else { x = other; } return x; } }"""); }