Files
kotlin-fork/js/js.translator/testData/delegateProperty/cases/delegateForExtProperty.kt
T
2014-03-11 20:04:00 +04:00

15 lines
194 B
Kotlin

package foo
class Delegate {
fun get(t: A, p: PropertyMetadata): Int = 1
}
val A.prop: Int by Delegate()
class A {
}
fun box(): String {
return if (A().prop == 1) "OK" else "fail"
}