Files
kotlin-fork/compiler/testData/codegen/box/objects/localFunctionInObjectInitializer_kt4516.kt
T
2020-11-09 16:04:43 +03:00

21 lines
356 B
Kotlin
Vendored

// DONT_TARGET_EXACT_BACKEND: WASM
// WASM_MUTE_REASON: STDLIB_COLLECTIONS
// KJS_WITH_FULL_RUNTIME
object O {
val mmmap = HashMap<String, Int>();
init {
fun doStuff() {
mmmap.put("two", 2)
}
doStuff()
}
}
fun box(): String {
val r = O.mmmap["two"]
if (r != 2) return "Fail: $r"
return "OK"
}