diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt index 3e189f5dfed..2a850c269be 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt @@ -792,17 +792,17 @@ abstract class FirDataFlowAnalyzer( fun exitSafeCall(safeCall: FirSafeCallExpression) { val node = graphBuilder.exitSafeCall().mergeIncomingFlow() - val previousFlow = node.previousFlow + val flow = node.flow - val variable = variableStorage.getOrCreateVariable(previousFlow, safeCall) + val variable = variableStorage.getOrCreateVariable(flow, safeCall) val receiverVariable = when (variable) { // There is some bug with invokes. See KT-36014 is RealVariable -> variable.explicitReceiverVariable ?: return - is SyntheticVariable -> variableStorage.getOrCreateVariable(previousFlow, safeCall.receiver) + is SyntheticVariable -> variableStorage.getOrCreateVariable(flow, safeCall.receiver) } - logicSystem.addImplication(node.flow, (variable notEq null) implies (receiverVariable notEq null)) + logicSystem.addImplication(flow, (variable notEq null) implies (receiverVariable notEq null)) if (receiverVariable.isReal()) { - logicSystem.addImplication(node.flow, (variable notEq null) implies (receiverVariable typeEq any)) + logicSystem.addImplication(flow, (variable notEq null) implies (receiverVariable typeEq any)) } }