mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
20 lines
291 B
Kotlin
Vendored
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
|
|
} |