new overload resolution: first check that collected methods are potentially compatible with args; for generic methods without specified type arguments this already means that they are applicable; for non generic methods (or raw method calls) expressions should be compatible with parameter types (formal parameter types = actual types as substitutor is known) (IDEA-147798)

This commit is contained in:
Anna Kozlova
2015-11-20 18:22:02 +01:00
parent aded26aa0a
commit 61f120b30e
11 changed files with 146 additions and 43 deletions
@@ -52,7 +52,7 @@ class Test {
static {
Test s1 = staticCall(Test::n0);
Test s2 = staticCall(Test::n1);
Test s3 = staticCall<error descr="Cannot resolve method 'staticCall(<method reference>)'">(Test::n2)</error>;
Test s3 = <error descr="Cannot resolve method 'staticCall(<method reference>)'">staticCall</error>(Test::n2);
Test s4 = staticCall<error descr="Ambiguous method call: both 'Test.staticCall(I1<Test>)' and 'Test.staticCall(I2<Test, String>)' match">(Test::n01)</error>;
Test s5 = staticCall<error descr="Ambiguous method call: both 'Test.staticCall(I1<Test>)' and 'Test.staticCall(I2<Test, String>)' match">(Test::n012)</error>;
}