[FIR2IR] Don't create f/o symbols on smartcasted Nothing in dispatch receiver
^KT-63525 Fixed
This commit is contained in:
committed by
Space Team
parent
62e9c944fe
commit
5c632bc78e
@@ -277,7 +277,10 @@ fun FirCallableSymbol<*>.toSymbolForCall(
|
||||
}
|
||||
// Member fake override or bound callable reference
|
||||
dispatchReceiver != null -> {
|
||||
val callSiteDispatchReceiverType = dispatchReceiver.resolvedType
|
||||
val callSiteDispatchReceiverType = when (dispatchReceiver) {
|
||||
is FirSmartCastExpression -> dispatchReceiver.smartcastTypeWithoutNullableNothing?.coneType ?: dispatchReceiver.resolvedType
|
||||
else -> dispatchReceiver.resolvedType
|
||||
}
|
||||
val declarationSiteDispatchReceiverType = dispatchReceiverType
|
||||
val type = if (callSiteDispatchReceiverType is ConeDynamicType && declarationSiteDispatchReceiverType != null) {
|
||||
declarationSiteDispatchReceiverType
|
||||
|
||||
+6
@@ -11907,6 +11907,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/controlflow/break1.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("callOnSmarcastedNothing.kt")
|
||||
public void testCallOnSmarcastedNothing() {
|
||||
runTest("compiler/testData/codegen/box/controlflow/callOnSmarcastedNothing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("for_loops.kt")
|
||||
public void testFor_loops() {
|
||||
|
||||
+6
@@ -11907,6 +11907,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated
|
||||
runTest("compiler/testData/codegen/box/controlflow/break1.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("callOnSmarcastedNothing.kt")
|
||||
public void testCallOnSmarcastedNothing() {
|
||||
runTest("compiler/testData/codegen/box/controlflow/callOnSmarcastedNothing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("for_loops.kt")
|
||||
public void testFor_loops() {
|
||||
|
||||
+6
@@ -11907,6 +11907,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/controlflow/break1.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("callOnSmarcastedNothing.kt")
|
||||
public void testCallOnSmarcastedNothing() {
|
||||
runTest("compiler/testData/codegen/box/controlflow/callOnSmarcastedNothing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("for_loops.kt")
|
||||
public void testFor_loops() {
|
||||
|
||||
Reference in New Issue
Block a user