[K/N][stdlib] Added @EagerInitialization annotation

It is needed in the lazy top level properties initialization strategy to
revert to the previous strategy at least for the transition period
This commit is contained in:
Igor Chevdar
2021-07-15 15:24:19 +05:00
parent 4de6fd8be2
commit bea82ba2cd

View File

@@ -58,6 +58,20 @@ public typealias ThreadLocal = kotlin.native.concurrent.ThreadLocal
/** @suppress */
public typealias SharedImmutable = kotlin.native.concurrent.SharedImmutable
/**
* Forces a top-level property to be initialized eagerly, opposed to lazily on the first access to file and/or property.
* This annotation can be used as temporal migration assistance during the transition from the previous Kotlin/Native initialization scheme "eager by default"
* to the new one, "lazy by default".
*
* This annotation is intended to be used only as a temporal workaround and will be removed through the regular deprecation cycle as soon as the new initialization scheme will become the default one.
* For the usages that cannot be emulated on the new initialization scheme without this annotation, it is strongly recommended to report them during the transition period, so the proper replacement can be introduced.
*/
@Target(AnnotationTarget.PROPERTY)
@Retention(AnnotationRetention.BINARY)
@ExperimentalStdlibApi
@Deprecated("This annotation is a temporal migration assistance and may be removed in the future releases, please consider filing an issue about the case where it is needed")
public annotation class EagerInitialization
/**
* Makes top level function available from C/C++ code with the given name.
*