Allow top-level local delegated properties in scripts

This commit is contained in:
Mikhael Bogdanov
2016-05-10 10:36:44 +03:00
parent 6ece2b41d6
commit c06b51c1d1
10 changed files with 60 additions and 14 deletions
@@ -0,0 +1,12 @@
import kotlin.reflect.KProperty
class Delegate {
operator fun getValue(t: Any?, p: KProperty<*>): Int = 3
}
val prop: Int by Delegate()
val x = prop
// expected: x: 3