lambda: accept intersection type when exactly one conjunct is functional

This commit is contained in:
Anna Kozlova
2014-04-17 14:59:06 +02:00
parent 4a34bd569b
commit a55db18089
2 changed files with 24 additions and 10 deletions

View File

@@ -18,3 +18,18 @@ class Test {
Object o5 = (Runnable & A) <error descr="Multiple non-overriding abstract methods found in Runnable & A">() -> {}</error>;
}
}
class Test1 {
interface A {
<X> void foo();
}
interface B {
void foo();
}
{
Object c0 = (A & B) ()->{};
}
}