Files
kotlin-fork/compiler/testData/codegen/box/delegatedProperty/inTrait.kt
T
2013-04-30 21:47:22 +04:00

16 lines
222 B
Kotlin

class Delegate {
fun get(t: Any?, p: String): Int = 1
}
trait A {
val prop: Int
}
class AImpl: A {
override val prop: Int by Delegate()
}
fun box(): String {
return if(AImpl().prop == 1) "OK" else "fail"
}