Files
kotlin-fork/compiler/testData/codegen/box/delegatedProperty/inTrait.kt
T
2015-05-12 19:43:17 +02:00

16 lines
236 B
Kotlin
Vendored

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