From dedb9d90185bc0ee5c28063ef5298bf9ead3cbba Mon Sep 17 00:00:00 2001 From: Ilya Goncharov Date: Mon, 20 Sep 2021 20:57:12 +0300 Subject: [PATCH] [JS IR] Fix assertion to enable early created declarations --- .../kotlin/ir/backend/js/lower/PropertyLazyInitLowering.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PropertyLazyInitLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PropertyLazyInitLowering.kt index df2ff549277..974ae839888 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PropertyLazyInitLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PropertyLazyInitLowering.kt @@ -290,7 +290,7 @@ private fun IrDeclaration.isCompatibleDeclaration(context: JsIrBackendContext) = private fun IrDeclaration.assertCompatibleDeclaration() { - assert(this !is PersistentIrElementBase<*> || createdOn == 0) + assert(this !is PersistentIrElementBase<*> || this.createdOn <= this.factory.stageController.currentStage) } private val compatibleOrigins = listOf(