Files
kotlin-fork/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTrait.kt
T
2013-04-30 20:08:04 +04:00

19 lines
246 B
Kotlin

trait A {
val prop: Int
}
class AImpl: A {
override val prop by Delegate()
}
fun foo() {
AImpl().prop
}
class Delegate {
fun get(t: Any?, p: String): Int {
t.equals(p) // to avoid UNUSED_PARAMETER warning
return 1
}
}