summaryrefslogtreecommitdiff
path: root/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/QualifierTypeArgs.java
blob: f88c5bf76c051204e4933fee5a00f14c2d4d241d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import java.util.*;

class MyTest {
  interface I {
    String m(Foo<String> f);
  }

  class Foo<X> {
    String foo() {
      return null;
    }

    {
      I i = Foo<String> :: foo;
      I i1 = Foo<Integer> :: <error descr="Cannot resolve method 'foo'">foo</error>;
    }
  }
}

class MyTest1 {
    interface I {
       String m(Foo f);
    }

    static class Foo<X> {
       String foo() { return null; }

       static void test() {
          I i = Foo::foo;
       }
    }
}

class MyTest2 {
  public static void main(String[] args) {
    Arrays.sort(new String[0], String.CASE_INSENSITIVE_ORDER::compare);
  }
}