void () { doTest( """ class AutoCloseableSample { void test() { final AC res = new AC().withX(10).withX(12); res.close(); } } class AC implements AutoCloseable { native AC withX(int x); @Override public void close(){} }"""); }