mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 18:50:54 +07:00
lambda: accept intersection type when exactly one conjunct is functional
This commit is contained in:
@@ -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) ()->{};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user