diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt index 3fa86eca1e3..12fa1cd5c23 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt @@ -130,7 +130,7 @@ private fun IrFunction.isBridgeToSuspendImplMethod(): Boolean = private fun IrFunction.isStaticInlineClassReplacementDelegatingCall(): Boolean = this is IrAttributeContainer && !isStaticInlineClassReplacement && - parentAsClass.declarations.find { it is IrAttributeContainer && it.attributeOwnerId == attributeOwnerId && it !== this } + (parent as? IrClass)?.declarations?.find { it is IrAttributeContainer && it.attributeOwnerId == attributeOwnerId && it !== this } ?.isStaticInlineClassReplacement == true private val BRIDGE_ORIGINS = setOf(