summaryrefslogtreecommitdiff
path: root/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA78402.java
blob: ed8d259ab4622252a4ec09b2987305719f68eee1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import java.util.Collection;
import java.util.List;

class Reference<T> {}

class Bug {
  private static <T> void foo(List<T> x, Reference<String> y) {
    System.out.println(x);
  }

  private static <T> void foo(Collection<T> x, Reference<T> y) {
    System.out.println(x);
  }

  public static void bazz(List<String> bar) {
    foo<error descr="Ambiguous method call: both 'Bug.foo(List<String>, Reference<String>)' and 'Bug.foo(Collection<String>, Reference<String>)' match">(bar, null)</error>;
  }
}