Inline-only Lazy.getValue extension

This commit is contained in:
Ilya Gorbunov
2016-02-03 18:05:06 +03:00
parent 8c17c5f40b
commit 6038bde3c1
+2 -1
View File
@@ -78,7 +78,8 @@ public fun <T> lazy(lock: Any?, initializer: () -> T): Lazy<T> = SynchronizedLaz
* This extension allows to use instances of Lazy for property delegation:
* `val property: String by lazy { initializer }`
*/
public operator fun <T> Lazy<T>.getValue(thisRef: Any?, property: KProperty<*>): T = value
@kotlin.internal.InlineOnly
public inline operator fun <T> Lazy<T>.getValue(thisRef: Any?, property: KProperty<*>): T = value
/**
* Specifies how a [Lazy] instance synchronizes access among multiple threads.