Files
kotlin-fork/compiler/testData/codegen/script/topLevelLocalDelegatedProperty.kts
T
Ilya Chernikov f79f715590 Fir2Ir: remove error reporting on no receiver
this error is not valid for scripts, where some receivers are set
later in the lowering, and it looks like in other cases this problem
will be detected later in lowering or codegen anyway.
2023-07-05 19:46:03 +00:00

14 lines
178 B
Kotlin
Vendored

import kotlin.reflect.KProperty
class Delegate {
operator fun getValue(t: Any?, p: KProperty<*>): Int = 3
}
val prop: Int by Delegate()
val x = prop
// expected: x: 3