mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
21 lines
302 B
Kotlin
Vendored
21 lines
302 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
|
|
|
import kotlin.reflect.KProperty
|
|
|
|
class Delegate {
|
|
operator fun getValue(t: Any?, p: KProperty<*>): Int {
|
|
return 1
|
|
}
|
|
}
|
|
|
|
val a: Int by Delegate()
|
|
|
|
class Foo {
|
|
val a: Int by Delegate()
|
|
}
|
|
|
|
fun foo() {
|
|
val a: Int by Delegate()
|
|
}
|
|
|