[Wasm] Fixed invalid delegated property getters lowering

#Fixed KT-58941
This commit is contained in:
Igor Yakovlev
2023-07-24 15:28:37 +02:00
committed by Space Team
parent 488d24296a
commit e8e8a26cd1
5 changed files with 4 additions and 8 deletions
@@ -204,14 +204,14 @@ internal class WasmPropertyReferenceLowering(val context: WasmBackendContext) :
val returnType = expression.getter?.owner?.returnType ?: expression.field!!.owner.type
val getterCallableReference = expression.getter?.owner?.let { getter ->
getter.extensionReceiverParameter.let {
if (it != null && expression.extensionReceiver == null)
receiverTypes.add(it.type)
}
getter.dispatchReceiverParameter.let {
if (it != null && expression.dispatchReceiver == null)
receiverTypes.add(it.type)
}
getter.extensionReceiverParameter.let {
if (it != null && expression.extensionReceiver == null)
receiverTypes.add(it.type)
}
val getterKFunctionType = this@WasmPropertyReferenceLowering.context.irBuiltIns.getKFunctionType(
returnType,
receiverTypes