FIR CLI: initialize module and dependencies
#KT-42624 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
01ba1cded7
commit
4d28463f1a
+21
-1
@@ -1,7 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
|
||||
fun box(): String {
|
||||
fun foo(): String {
|
||||
val a = ArrayList<String>()
|
||||
a.add("OK")
|
||||
for (i in a.indices) {
|
||||
@@ -9,3 +9,23 @@ fun box(): String {
|
||||
}
|
||||
return "Fail"
|
||||
}
|
||||
|
||||
// KT-42642
|
||||
fun bar(): String {
|
||||
val a = ArrayList<String>()
|
||||
a.add("O")
|
||||
a.add("K")
|
||||
val map = mutableMapOf<String, String>().apply {
|
||||
for (i in a.indices step 2) {
|
||||
put(a[i].toLowerCase(), a[i])
|
||||
put(a[i + 1].toLowerCase(), a[i + 1])
|
||||
}
|
||||
}
|
||||
return map.values.joinToString(separator = "")
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val r = foo()
|
||||
if (r != "OK") return r
|
||||
return bar()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user