From 5746a7c4fc8f2fa31601c8ec0a2d14b43eccef24 Mon Sep 17 00:00:00 2001 From: Ilya Goncharov Date: Tue, 27 Oct 2020 18:48:52 +0300 Subject: [PATCH] [JS IR] Only consider top level properties ^KT-43222 fixed --- .../kotlin/ir/backend/js/lower/PropertyLazyInitLowering.kt | 2 ++ 1 file changed, 2 insertions(+) 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 720a5016ac5..3a131e5153c 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 @@ -6,6 +6,7 @@ package org.jetbrains.kotlin.ir.backend.js.lower import org.jetbrains.kotlin.backend.common.FileLoweringPass +import org.jetbrains.kotlin.backend.common.ir.isTopLevel import org.jetbrains.kotlin.ir.IrStatement import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET import org.jetbrains.kotlin.ir.backend.js.JsIrBackendContext @@ -167,6 +168,7 @@ private class PropertySearcher : IrElementTransformerVoid() { declaration.correspondingPropertySymbol ?.owner + ?.takeIf { it.isTopLevel } ?.takeIf { !it.isConst } ?.takeIf { it !in propertyToFunction } ?.let {