Fir incorrect usage of AbstractExpectActualCompatibilityChecker.getCallablesCompatibility API

^KT-62027 Fixed

`getCallablesCompatibility` requires parentSubstitutor as a parameter,
but we created a member-level substitutor

`getCallablesCompatibility` will create member-level substitutor itself,
no need to create member-level substitutor on the call site.

IndexOutOfBounds was happening in an attempt of creating member-level
substitutor

I will refactor the `createExpectActualTypeParameterSubstitutor` API in
the following commits later. It will help to avoid problems like that
This commit is contained in:
Nikita Bobko
2023-09-19 12:18:42 +02:00
committed by Space Team
parent 9ff3871a8b
commit b15787bfa8
6 changed files with 50 additions and 6 deletions
@@ -640,6 +640,12 @@ public class FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated extends Abst
runTest("compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/injectVarargParameterOverload.kt");
}
@Test
@TestMetadata("kt62027.kt")
public void testKt62027() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/kt62027.kt");
}
@Test
@TestMetadata("memberScopeMismatch_oldLanguageVersion.kt")
public void testMemberScopeMismatch_oldLanguageVersion() throws Exception {
@@ -640,6 +640,12 @@ public class FirOldFrontendMPPDiagnosticsWithPsiTestGenerated extends AbstractFi
runTest("compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/injectVarargParameterOverload.kt");
}
@Test
@TestMetadata("kt62027.kt")
public void testKt62027() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/kt62027.kt");
}
@Test
@TestMetadata("memberScopeMismatch_oldLanguageVersion.kt")
public void testMemberScopeMismatch_oldLanguageVersion() throws Exception {