overload resolution: erase type of parameter when site substitutor is raw (IDEA-203450)

similar to erasure of call type when inferred substitutor is raw
This commit is contained in:
Anna.Kozlova
2018-12-03 14:33:04 +01:00
parent 1afc043792
commit d2042376d2
3 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
import java.util.HashSet;
import java.util.Set;
class TestCaller1<P1> {
{
TestCaller1.foo(null);
}
public static void foo(HashSet<Integer> fn) { }
public <P> void foo(Set<String> fn) { }
}
class TestCaller2 {
{
TestCaller2.foo<error descr="Ambiguous method call: both 'TestCaller2.foo(HashSet<Integer>)' and 'TestCaller2.foo(Set<String>)' match">(null)</error>;
}
public static void foo(HashSet<Integer> fn) { }
public <P> void foo(Set<String> fn) { }
}
class TestCaller3 {
{
TestCaller2.foo<error descr="Ambiguous method call: both 'TestCaller2.foo(HashSet<Integer>)' and 'TestCaller2.foo(Set<String>)' match">(null)</error>;
}
public static void foo(HashSet<Integer> fn) { }
public static void foo(Set<String> fn) { }
}