ed4b801771
The fix saves result type from the first pass through the Attr.visitLambda and returns it after recovery pass to avoid NPE caused by exposure of Type.recoveryType Reviewed-by: mcimadamore
14 lines
329 B
Java
14 lines
329 B
Java
/*
|
|
* @test /nodynamiccopyright/
|
|
* @bug 8238735
|
|
* @summary javac should fail without throwing NPE
|
|
* @compile/fail/ref=T8238735.out -XDrawDiagnostics T8238735.java
|
|
*/
|
|
|
|
class T8238735 {
|
|
public static void main(String[] args) {
|
|
boolean first = true;
|
|
first = first ? false : (boolean)(() -> false) ;
|
|
}
|
|
}
|