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

16 lines
276 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.reflect.KProperty
val Int.a by Delegate(<!NO_THIS!>this<!>)
class A {
val Int.a by Delegate(<!TYPE_MISMATCH!>this<!>)
}
class Delegate(i: Int) {
operator fun getValue(t: Any?, p: KProperty<*>): Int {
return 1
}
}