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

13 lines
246 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
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: PropertyMetadata): Int {
return 1
}
}