jdk-24/test/langtools/tools/javac/analyzer/LambdaWithMethod.java
Jan Lahoda 7cdac47d37 8191981: javac crash when detecting lambda candidates
Ensuring proper positions on the testing AST nodes created by Analyzer.

Reviewed-by: mcimadamore
2017-11-29 14:41:09 +01:00

18 lines
446 B
Java

/**
* @test /nodynamiccopyright/
* @bug 8191981
* @compile/fail/ref=LambdaWithMethod.out -Werror -XDrawDiagnostics -XDfind=lambda LambdaWithMethod.java
*/
public class LambdaWithMethod {
public static void run(Runnable r) {
run(new Runnable() {
public void run() {
put(get());
}
});
}
private static String get() { return null; }
private static void put(String i) {}
}