// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS // WITH_RUNTIME inline fun createArray(n: Int, crossinline block: () -> T): Array { return Array(n) { block() } } fun box(): String { val x = createArray(5) { 3 } assert(x.all { it == 3 }) return "OK" }