testdata: ensure intersection type is not missed during inference

This commit is contained in:
Anna Kozlova
2014-04-22 20:02:47 +02:00
parent 7898108ccd
commit d5107d652f
2 changed files with 26 additions and 0 deletions
@@ -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) {}
}