JVM_IR: generate more correct parameter metadata

This commit is contained in:
pyos
2019-12-03 11:16:22 +01:00
committed by max-kammerer
parent cf86dc9a89
commit 13a2879b78
10 changed files with 50 additions and 85 deletions
@@ -544,12 +544,14 @@ fun createStaticFunctionWithReceivers(
this,
name = Name.identifier("this"),
index = offset++,
type = dispatchReceiverType!!
type = dispatchReceiverType!!,
origin = IrDeclarationOrigin.MOVED_RECEIVER_PARAMETER
)
val extensionReceiver = oldFunction.extensionReceiverParameter?.copyTo(
this,
name = Name.identifier("receiver"),
index = offset++
index = offset++,
origin = IrDeclarationOrigin.MOVED_RECEIVER_PARAMETER
)
valueParameters.addAll(listOfNotNull(dispatchReceiver, extensionReceiver) +
oldFunction.valueParameters.map { it.copyTo(this, index = it.index + offset) }