Remove PropertyMetadata from project and bytecode, migrate code to KProperty

This commit is contained in:
Alexander Udalov
2015-11-20 16:37:47 +03:00
parent fb61dc7e81
commit 7b3b157707
22 changed files with 99 additions and 74 deletions
@@ -16,6 +16,8 @@
package org.jetbrains.kotlin.storage
import kotlin.reflect.KProperty
public interface MemoizedFunctionToNotNull<P, R : Any> : Function1<P, R> {
public fun isComputed(key: P): Boolean
}
@@ -32,6 +34,6 @@ public interface NullableLazyValue<T : Any> : Function0<T?> {
public fun isComputed(): Boolean
}
public operator fun <T : Any> NotNullLazyValue<T>.getValue(_this: Any?, p: PropertyMetadata): T = invoke()
public operator fun <T : Any> NotNullLazyValue<T>.getValue(_this: Any?, p: KProperty<*>): T = invoke()
public operator fun <T : Any> NullableLazyValue<T>.getValue(_this: Any?, p: PropertyMetadata): T? = invoke()
public operator fun <T : Any> NullableLazyValue<T>.getValue(_this: Any?, p: KProperty<*>): T? = invoke()