Files
kotlin-fork/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTrait.kt
T

22 lines
286 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.reflect.KProperty
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: KProperty<*>): Int {
return 1
}
}