summaryrefslogtreecommitdiff
path: root/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/LiftedIntersectionType.java
blob: de9d517da449891005f5785d80b99e3d50cc8ec0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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) {}

}