[FIR] Rewind DFA after call arguments for correct receiver smartcasting

^KT-63709 Fixed
This commit is contained in:
Brian Norman
2023-11-27 13:48:09 -06:00
committed by Space Team
parent 38d5e56530
commit 0881910a1b
128 changed files with 22457 additions and 16148 deletions
@@ -58,7 +58,10 @@ internal open class StubBodyResolveTransformerComponents(
override fun receiverUpdated(symbol: FirBasedSymbol<*>, info: TypeStatement?) =
error("Should not be called")
override fun getTypeUsingSmartcastInfo(expression: FirExpression): Pair<PropertyStability, MutableList<ConeKotlinType>>? =
override fun getTypeUsingSmartcastInfo(
expression: FirExpression,
ignoreCallArguments: Boolean,
): Pair<PropertyStability, MutableList<ConeKotlinType>>? =
null
}
}
@@ -45238,6 +45238,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachUnsafe.kt");
}
@Test
@TestMetadata("invokeRecieverUnsafe.kt")
public void testInvokeRecieverUnsafe() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/invokeRecieverUnsafe.kt");
}
@Test
@TestMetadata("kt10463.kt")
public void testKt10463() throws Exception {
@@ -51824,6 +51824,18 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo
runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt");
}
@Test
@TestMetadata("invokeRecieverSmartcastK1.kt")
public void testInvokeRecieverSmartcastK1() throws Exception {
runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt");
}
@Test
@TestMetadata("invokeRecieverSmartcastK2.kt")
public void testInvokeRecieverSmartcastK2() throws Exception {
runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt");
}
@Test
@TestMetadata("kt17725.kt")
public void testKt17725() throws Exception {
@@ -45238,6 +45238,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachUnsafe.kt");
}
@Test
@TestMetadata("invokeRecieverUnsafe.kt")
public void testInvokeRecieverUnsafe() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/invokeRecieverUnsafe.kt");
}
@Test
@TestMetadata("kt10463.kt")
public void testKt10463() throws Exception {
@@ -51824,6 +51824,18 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi
runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt");
}
@Test
@TestMetadata("invokeRecieverSmartcastK1.kt")
public void testInvokeRecieverSmartcastK1() throws Exception {
runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK1.kt");
}
@Test
@TestMetadata("invokeRecieverSmartcastK2.kt")
public void testInvokeRecieverSmartcastK2() throws Exception {
runTest("compiler/testData/codegen/box/smartCasts/invokeRecieverSmartcastK2.kt");
}
@Test
@TestMetadata("kt17725.kt")
public void testKt17725() throws Exception {