JVM IR: Initialize parent field in InlineCallableReferenceToLambda

This commit is contained in:
Steven Schäfer
2020-02-17 15:56:51 +01:00
committed by Alexander Udalov
parent c2eab08cc9
commit 8c9ebc1bf9
@@ -84,6 +84,7 @@ internal class InlineCallableReferenceToLambdaPhase(val context: JvmBackendConte
returnType = field.type
isSuspend = false
}.apply {
parent = currentDeclarationParent
val boundReceiver = expression.dispatchReceiver ?: expression.extensionReceiver
val receiver =
@@ -140,6 +141,7 @@ internal class InlineCallableReferenceToLambdaPhase(val context: JvmBackendConte
returnType = referencedFunction.returnType
isSuspend = referencedFunction.isSuspend
}.apply {
parent = currentDeclarationParent
for ((index, argumentType) in argumentTypes.withIndex()) {
addValueParameter {
name = Name.identifier("p$index")