void () { doTest( """ class Test{ void test(){ AC ac = makeAc(); ac.use(); ac.close(); } AC makeAc() {return null;} } class AC implements AutoCloseable { AC use() {return this; } @Override public void close(){} }"""); }