void () { doTest("import java.util.*;" + "class X {" + " void m(List<String> list) {" + " final Z<String, Y> f = /*'Y' used without 'try'-with-resources statement*/Y::new/**/;" + " }" + " class Y implements java.io.Closeable {" + " Y(String s) {}" + " @Override public void close() throws java.io.IOException {}" + " }" + " interface Z<T, R> {\n" + " R apply(T t);" + " }" + "}"); }