JVM_IR: fix name of received field for suspend lambdas

$ at the start caused AnonymousObjectTransformer to skip the field.
This commit is contained in:
Georgy Bronnikov
2019-12-21 15:26:16 +03:00
committed by Ilmir Usmanov
parent 068d3f4beb
commit d4b0151f51
10 changed files with 58 additions and 3 deletions
@@ -110,7 +110,8 @@ private class AddContinuationLowering(private val context: JvmBackendContext) :
val receiverField = info.function.extensionReceiverParameter?.let {
assert(info.arity != 0)
addField("\$p", it.type)
// Do not put '$' at the start, to avoid being caught by inlineCodegenUtils.isCapturedFieldName()
addField("p\$", it.type)
}
val parametersFields = info.function.valueParameters.map { addField(it.name.asString(), it.type) }