Files
kotlin-fork/compiler/testData/diagnostics/tests/delegatedProperty/thisInDelegate.kt
T
Evgeny Gerashchenko 897854b3dc KT-6671 Report unused constructor parameters
#KT-6671 fixed
2015-01-27 22:38:27 +03:00

12 lines
272 B
Kotlin

val Int.a by Delegate(<!NO_THIS!>this<!>)
class A {
val Int.a by Delegate(<!TYPE_MISMATCH!>this<!>)
}
class Delegate(<!UNUSED_PARAMETER!>i<!>: Int) {
fun get(t: Any?, p: PropertyMetadata): Int {
t.equals(p) // to avoid UNUSED_PARAMETER warning
return 1
}
}