[FIR2IR] Approximate extension receiver type after type argument substitution

Frontend may leak captured types into type arguments, so they should be
  approximated before using them in fir2ir cast inserter to determine
 a specific type from smartcast

^KT-62863 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-11-06 14:34:04 +02:00
committed by Space Team
parent d2ebaf4e6c
commit d08567c2c7
22 changed files with 261 additions and 1 deletions
@@ -38789,6 +38789,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
runTest("compiler/testData/codegen/box/smartCasts/smartCastInsideIf.kt");
}
@Test
@TestMetadata("smartcastToStarType.kt")
public void testSmartcastToStarType() throws Exception {
runTest("compiler/testData/codegen/box/smartCasts/smartcastToStarType.kt");
}
@Test
@TestMetadata("whenSmartCast.kt")
public void testWhenSmartCast() throws Exception {
@@ -39787,6 +39787,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
runTest("compiler/testData/codegen/box/smartCasts/smartCastInsideIf.kt");
}
@Test
@TestMetadata("smartcastToStarType.kt")
public void testSmartcastToStarType() throws Exception {
runTest("compiler/testData/codegen/box/smartCasts/smartcastToStarType.kt");
}
@Test
@TestMetadata("whenSmartCast.kt")
public void testWhenSmartCast() throws Exception {
@@ -38291,6 +38291,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
runTest("compiler/testData/codegen/box/smartCasts/smartCastInsideIf.kt");
}
@Test
@TestMetadata("smartcastToStarType.kt")
public void testSmartcastToStarType() throws Exception {
runTest("compiler/testData/codegen/box/smartCasts/smartcastToStarType.kt");
}
@Test
@TestMetadata("whenSmartCast.kt")
public void testWhenSmartCast() throws Exception {
@@ -38790,6 +38790,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
runTest("compiler/testData/codegen/box/smartCasts/smartCastInsideIf.kt");
}
@Test
@TestMetadata("smartcastToStarType.kt")
public void testSmartcastToStarType() throws Exception {
runTest("compiler/testData/codegen/box/smartCasts/smartcastToStarType.kt");
}
@Test
@TestMetadata("whenSmartCast.kt")
public void testWhenSmartCast() throws Exception {