diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/AddContinuationLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/AddContinuationLowering.kt index 829b1c5334f..28677625734 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/AddContinuationLowering.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/AddContinuationLowering.kt @@ -176,7 +176,13 @@ private class AddContinuationLowering(private val context: JvmBackendContext) : val receiverField = info.function.extensionReceiverParameter?.let { assert(info.arity != 0) // Do not put '$' at the start, to avoid being caught by inlineCodegenUtils.isCapturedFieldName() - addField("p\$", it.type) + addField { + name = Name.identifier("p\$") + // NB extension receiver can't be crossinline + origin = LocalDeclarationsLowering.DECLARATION_ORIGIN_FIELD_FOR_CAPTURED_VALUE + type = it.type + visibility = Visibilities.PRIVATE + } } val parametersFields = info.function.valueParameters.map {