void () { doTest( """ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectOutputStream; class Test{ Test(AutoCloseable ac){} void test(){ AC ac = new AC(); new Test(ac); } } class AC implements AutoCloseable { @Override public void close(){} }"""); }