Files
kotlin-fork/js/js.translator/testFiles/delegateProperty/cases/delegateForExtProperty.kt
T
2013-08-14 20:05:27 +04:00

14 lines
188 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"
}