From 34ee146148b9d264409cc7adab2ad9cd9722a116 Mon Sep 17 00:00:00 2001 From: Ilya Goncharov Date: Thu, 29 Oct 2020 13:29:17 +0300 Subject: [PATCH] [JS IR] Internal visibility for init fun ^KT-43222 fixed --- .../kotlin/ir/backend/js/lower/PropertyLazyInitLowering.kt | 3 +++ 1 file changed, 3 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 1f3ea750419..d35ee5020aa 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 @@ -7,11 +7,13 @@ 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.descriptors.DescriptorVisibilities.INTERNAL import org.jetbrains.kotlin.ir.IrStatement import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET import org.jetbrains.kotlin.ir.backend.js.JsIrBackendContext import org.jetbrains.kotlin.ir.backend.js.ir.JsIrArithBuilder import org.jetbrains.kotlin.ir.backend.js.ir.JsIrBuilder +import org.jetbrains.kotlin.ir.backend.js.utils.isPure import org.jetbrains.kotlin.ir.builders.declarations.addFunction import org.jetbrains.kotlin.ir.builders.declarations.buildField import org.jetbrains.kotlin.ir.declarations.* @@ -52,6 +54,7 @@ class PropertyLazyInitLowering(private val context: JsIrBackendContext) : FileLo val initialisationFun = irFactory.addFunction(irFile) { name = Name.identifier("init properties $fileName") returnType = irBuiltIns.unitType + visibility = INTERNAL origin = JsIrBuilder.SYNTHESIZED_DECLARATION }.apply { buildPropertiesInitializationBody(