void (AutoCloseable y) { try(<error descr="Resource references are not supported at language level '7'">y</error><error descr="')' expected"> </error>{ System.out.println("Hello"); } catch (Exception e) { throw new RuntimeException(e); } }