Files
kotlin-fork/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTrait.kt
T
2015-10-14 01:29:09 +03:00

20 lines
257 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
interface A {
val prop: Int
}
class AImpl: A {
override val prop by Delegate()
}
fun foo() {
AImpl().prop
}
class Delegate {
operator fun getValue(t: Any?, p: PropertyMetadata): Int {
return 1
}
}