[JS IR] Add test on initialization calling only once

This commit is contained in:
Ilya Goncharov
2021-09-20 15:25:43 +03:00
committed by Space
parent 01fbe6bacc
commit 4c0045b136
4 changed files with 29 additions and 2 deletions
@@ -284,8 +284,7 @@ private fun <T> IrDeclaration.withPersistentSafe(transform: IrDeclaration.() ->
} else null
private fun IrDeclaration.isCompatibleDeclaration(context: JsIrBackendContext) =
(this as? IrField)
?.correspondingProperty
correspondingProperty
?.hasAnnotation(context.intrinsics.jsEagerInitializationAnnotationSymbol) != true &&
withPersistentSafe { origin in compatibleOrigins } == true