56c819f06e
Before this commit we had two statements blocks for 'for' loops: range variable declaration + iterator variable declaration + while loop. However, BE requires a bit different loop structure to make lowerings properly so in this commit iterator declaration & while loop were extracted to separate block.
12 lines
174 B
Kotlin
Vendored
12 lines
174 B
Kotlin
Vendored
// KJS_WITH_FULL_RUNTIME
|
|
// WITH_RUNTIME
|
|
|
|
fun box(): String {
|
|
var str = "OK"
|
|
var r = ""
|
|
for (ch in str) {
|
|
r += ch
|
|
str = "zzz"
|
|
}
|
|
return r
|
|
} |