jdk-24/langtools/test/tools/javac/lambda/MethodReference50.java
Maurizio Cimadamore a494f0ab86 8003280: Add lambda tests
Turn on lambda expression, method reference and default method support

Reviewed-by: jjg
2012-11-17 19:01:03 +00:00

26 lines
464 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8003280
* @summary Add lambda tests
* check that erroneous method references are flagged with errors as expected
* @compile/fail/ref=MethodReference50.out -XDrawDiagnostics MethodReference50.java
*/
class MethodReference50 {
interface SAM1 {
void m();
}
interface SAM2 {
void m();
}
void call(SAM1 s) {}
void call(SAM2 s) {}
{
call(NonExistentType::m);
}
}