aoqi@0: /* aoqi@0: * @test /nodynamiccopyright/ aoqi@0: * @bug 7022711 aoqi@0: * @summary compiler crash in try-with-resources aoqi@0: * @compile/fail/ref=T7022711.out -XDrawDiagnostics T7022711.java aoqi@0: */ aoqi@0: aoqi@0: import java.io.*; aoqi@0: aoqi@0: class T7022711 { aoqi@0: public static void main (String args[]) throws Exception { aoqi@0: try (DataInputStream is = new DataInputStream(new FileInputStream("x"))) { aoqi@0: while (true) { aoqi@0: is.getChar(); // method not found aoqi@0: } aoqi@0: } catch (EOFException e) { aoqi@0: } aoqi@0: } aoqi@0: } aoqi@0: