From d0a70e5cc0ff0a42f19fd06fa9c7a66e72e2ab6a Mon Sep 17 00:00:00 2001 From: Ilmir Usmanov Date: Tue, 12 Oct 2021 00:04:20 +0200 Subject: [PATCH] Minor. Use safe cast in isStaticInlineClassReplacementDelegatingCall --- .../jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(