mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
testdata: ensure intersection type is not missed during inference
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
class Test {
|
||||
|
||||
interface A {
|
||||
A f();
|
||||
}
|
||||
interface B {}
|
||||
|
||||
static abstract class C implements A, B {}
|
||||
static abstract class D implements A, B {}
|
||||
|
||||
interface I<T> {
|
||||
T m(T arg);
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
foo(c, <error descr="Incompatible return type A in lambda expression">x -> x.f()</error>);
|
||||
foo(c, x -> x);
|
||||
}
|
||||
|
||||
<T> void foo(T t1, I<T> t3) {}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user