Revert "Temporarily remove isInitialized and tests, but keep the implementation"
This reverts commit 234148518e.
This commit is contained in:
committed by
Ilya Gorbunov
parent
abdcbf1fb2
commit
00be512532
@@ -66,6 +66,15 @@ internal annotation class InlineOnly
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
internal annotation class DynamicExtension
|
||||
|
||||
/**
|
||||
* The value of this parameter should be a property reference expression (`this::foo`), referencing a `lateinit` property,
|
||||
* the backing field of which is accessible at the point where the corresponding argument is passed.
|
||||
*/
|
||||
@Target(AnnotationTarget.VALUE_PARAMETER)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@SinceKotlin("1.2")
|
||||
internal annotation class AccessibleLateinitPropertyLiteral
|
||||
|
||||
/**
|
||||
* Specifies that this declaration is only completely supported since the specified version.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
@file:kotlin.jvm.JvmName("LateinitKt")
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
@file:Suppress("unused")
|
||||
|
||||
package kotlin
|
||||
|
||||
import kotlin.internal.InlineOnly
|
||||
import kotlin.internal.AccessibleLateinitPropertyLiteral
|
||||
import kotlin.reflect.KProperty0
|
||||
|
||||
/**
|
||||
* Returns `true` if this lateinit property has been assigned a value, and `false` otherwise.
|
||||
*
|
||||
* Cannot be used in an inline function, to avoid binary compatibility issues.
|
||||
*/
|
||||
@SinceKotlin("1.2")
|
||||
@InlineOnly
|
||||
inline val @receiver:AccessibleLateinitPropertyLiteral KProperty0<*>.isInitialized: Boolean
|
||||
get() = throw NotImplementedError("Implementation is intrinsic")
|
||||
Reference in New Issue
Block a user