Files
kotlin/compiler/testData/codegen/box/functions/localFunctions/localFunctionVsLocalVariable.kt
2018-08-15 13:35:14 +03:00

19 lines
261 B
Kotlin
Vendored

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
}