[FIR] Refactor FirTypeResolverImpl.resolveUserType

Fix IndexOutOfBoundsException on an attempt to cast an element

to inner class with type parameter

^KT-60921 Fixed
This commit is contained in:
Ivan Kochurkin
2023-08-09 22:15:08 +02:00
committed by Space Team
parent 5cd9afbf73
commit 42e5e43302
10 changed files with 157 additions and 186 deletions
@@ -13833,6 +13833,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/bareTypesComplex.kt");
}
@Test
@TestMetadata("castAnElementToInnerClassWithTypeParameter.kt")
public void testCastAnElementToInnerClassWithTypeParameter() throws Exception {
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/castAnElementToInnerClassWithTypeParameter.kt");
}
@Test
@TestMetadata("checkBoundsOuter.kt")
public void testCheckBoundsOuter() throws Exception {
@@ -13833,6 +13833,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/bareTypesComplex.kt");
}
@Test
@TestMetadata("castAnElementToInnerClassWithTypeParameter.kt")
public void testCastAnElementToInnerClassWithTypeParameter() throws Exception {
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/castAnElementToInnerClassWithTypeParameter.kt");
}
@Test
@TestMetadata("checkBoundsOuter.kt")
public void testCheckBoundsOuter() throws Exception {