jdk-24/langtools/test/tools/javac/lambda/8153884/T8153884.java
Maurizio Cimadamore 7fa26cbc1e 8153884: Expression lambda erroneously compatible with void-returning descriptor
Fix lambda compatibility check for void returning expressions

Reviewed-by: vromero
2016-05-16 13:05:42 +01:00

15 lines
303 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8153884
* @summary Expression lambda erroneously compatible with void-returning descriptor
* @compile/fail/ref=T8153884.out -XDrawDiagnostics T8153884.java
*/
class T8153884 {
void test() {
Runnable r = () -> (foo());
}
void foo() { }
}