Files
kotlin/compiler/testData/codegen/box/functions/localFunctions/localFunctionVsLocalVariable.kt
2018-06-09 19:15:38 +03:00

20 lines
286 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_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
}