[PSI2IR] Numeric promotion doesn't involve context receivers

This commit is contained in:
Anastasiya Shadrina
2021-11-18 15:03:41 +07:00
committed by TeamCityServer
parent a760865767
commit a59b9e78ac
@@ -81,6 +81,7 @@ fun IrExpression.safeCallOnDispatchReceiver(
contextReceivers = emptyList(),
dispatchReceiver = OnceExpressionValue(this),
isStatement = false
).call { dispatchReceiverValue, _, _ ->
).call { dispatchReceiverValue, _, contextReceiverValues ->
assert(contextReceiverValues.isEmpty()) { "Context receivers in numeric promotion" }
ifNotNull(dispatchReceiverValue!!.load())
}