[NI] Move abstract class instantiation check to call checkers

This way the check works for callable reference arguments.
Also candidate applicability during resolution does not change compared to the old inference.
^KT-37530 Fixed
This commit is contained in:
Pavel Kirpichenkov
2020-03-17 11:46:26 +03:00
parent 3f00de5d7b
commit a416fde814
13 changed files with 195 additions and 17 deletions
@@ -1891,6 +1891,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTestWithFirVali
runTest("compiler/testData/diagnostics/tests/callableReference/kt35959.kt");
}
@TestMetadata("kt37530.kt")
public void testKt37530() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/kt37530.kt");
}
@TestMetadata("kt7430_wrongClassOnLHS.kt")
public void testKt7430_wrongClassOnLHS() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/kt7430_wrongClassOnLHS.kt");
@@ -15867,6 +15872,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTestWithFirVali
runTest("compiler/testData/diagnostics/tests/overload/defaultParameters.kt");
}
@TestMetadata("disambiguateByFailedAbstractClassCheck.kt")
public void testDisambiguateByFailedAbstractClassCheck() throws Exception {
runTest("compiler/testData/diagnostics/tests/overload/disambiguateByFailedAbstractClassCheck.kt");
}
@TestMetadata("EmptyArgumentListInLambda.kt")
public void testEmptyArgumentListInLambda() throws Exception {
runTest("compiler/testData/diagnostics/tests/overload/EmptyArgumentListInLambda.kt");
@@ -1886,6 +1886,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
runTest("compiler/testData/diagnostics/tests/callableReference/kt35959.kt");
}
@TestMetadata("kt37530.kt")
public void testKt37530() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/kt37530.kt");
}
@TestMetadata("kt7430_wrongClassOnLHS.kt")
public void testKt7430_wrongClassOnLHS() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/kt7430_wrongClassOnLHS.kt");
@@ -15862,6 +15867,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
runTest("compiler/testData/diagnostics/tests/overload/defaultParameters.kt");
}
@TestMetadata("disambiguateByFailedAbstractClassCheck.kt")
public void testDisambiguateByFailedAbstractClassCheck() throws Exception {
runTest("compiler/testData/diagnostics/tests/overload/disambiguateByFailedAbstractClassCheck.kt");
}
@TestMetadata("EmptyArgumentListInLambda.kt")
public void testEmptyArgumentListInLambda() throws Exception {
runTest("compiler/testData/diagnostics/tests/overload/EmptyArgumentListInLambda.kt");