void () { doTest(""" import java.io.*; class X implements AutoCloseable { X(X other) {} X() {} @Override public void close() {} private static void example(X other) { X resource = new X(); new X(resource); } }"""); }