mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
20 lines
497 B
Java
20 lines
497 B
Java
/*
|
|
* @test /nodynamiccopyright/
|
|
* @bug 7022711
|
|
* @summary compiler crash in try-with-resources
|
|
* @compile/fail/ref=T7022711.out -XDrawDiagnostics T7022711.java
|
|
*/
|
|
|
|
import java.io.*;
|
|
|
|
class T7022711 {
|
|
public static void main (String args[]) throws Exception {
|
|
try (DataInputStream is = new DataInputStream(new FileInputStream("x"))) {
|
|
while (true) {
|
|
is.getChar(); // method not found
|
|
}
|
|
} catch (EOFException e) {
|
|
}
|
|
}
|
|
}
|
|
|