Files
kotlin-fork/compiler/testData/codegen/box/delegatedProperty/local/kt21085.kt
T
Mikhael Bogdanov 6aaa601239 Add tests for obsolete issues
#KT-21085 Obsolete
 #KT-13846 Obsolete
2019-02-07 11:39:48 +01:00

15 lines
275 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
class Delegate(val value: String) {
operator fun getValue(thisRef: Any?, kProperty: Any?) = value
}
fun box(): String {
val x by Delegate("O")
class Local(val y: String) {
val fn = { x + y }
}
return Local("K").fn()
}