summaryrefslogtreecommitdiff
path: root/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/AmbiguityRawGenerics.java
blob: 6c664dd9e65a677da0d5e299fb48a00f1fa1686c (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
interface I {
    void m();
}

interface I1 {
    int m();
}

interface I2 {
    String m();
}

interface I3<A> {
    A m();
}

class AmbiguityRawGenerics {

    void foo(I s) { }
    void foo(I1 s) { }
    void foo(I2 s) { }
    <Z> void foo(I3<Z> s) { }

    void bar() {
        foo<error descr="Ambiguous method call: both 'AmbiguityRawGenerics.foo(I1)' and 'AmbiguityRawGenerics.foo(I2)' match">(()-> { throw new RuntimeException(); })</error>;
    }
}