jdk-24/test/langtools/tools/javac/lambda/lambdaExpression/AbstractClass_neg.java
2017-09-12 19:03:39 +02:00

19 lines
388 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8003280
* @summary Add lambda tests
* Test that lambda conversion is only for SAM interface, not abstract class
* @compile/fail/ref=AbstractClass_neg.out -XDrawDiagnostics AbstractClass_neg.java
*/
public class AbstractClass_neg {
abstract class SAM {
abstract int m();
}
void test() {
SAM s = ()-> 6;
}
}