Files
kotlin/compiler/testData/codegen/box/functions/localFunctions/localFunctionVsLocalVariable.kt
2019-11-19 11:00:09 +03:00

20 lines
291 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
fun box(): String {
var s = ""
var foo = "O"
fun foo(x: String) {
s += x
}
fun foo() {
foo("K")
}
run {
foo(foo) // 1st foo is a local fun, second is a captured local var
foo()
}
return s
}