2012-11-17 19:01:03 +00:00
|
|
|
/*
|
|
|
|
* @test /nodynamiccopyright/
|
2014-12-16 13:44:22 +00:00
|
|
|
* @bug 8003280 8064365
|
2012-11-17 19:01:03 +00:00
|
|
|
* @summary Add lambda tests
|
|
|
|
* simple test for lambda candidate check
|
2014-12-12 18:07:24 +00:00
|
|
|
* @compile/fail/ref=LambdaConv18.out -XDrawDiagnostics -XDfind=lambda LambdaConv18.java
|
2012-11-17 19:01:03 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
class LambdaConv18 {
|
|
|
|
|
|
|
|
interface SAM {
|
|
|
|
void m();
|
|
|
|
}
|
|
|
|
|
|
|
|
interface NonSAM {
|
|
|
|
void m1();
|
|
|
|
void m2();
|
|
|
|
}
|
|
|
|
|
|
|
|
SAM s1 = new SAM() { public void m() {} };
|
|
|
|
NonSAM s2 = new NonSAM() { public void m1() {}
|
|
|
|
public void m2() {} };
|
|
|
|
NonExistent s3 = new NonExistent() { public void m() {} };
|
|
|
|
}
|