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

13 lines
323 B
Kotlin
Vendored

// DONT_TARGET_EXACT_BACKEND: WASM
// WASM_MUTE_REASON: STDLIB_COLLECTIONS
// KJS_WITH_FULL_RUNTIME
operator fun HashMap<String, Int?>.set(index: String, elem: Int?) {
this.put(index, elem)
}
fun box(): String {
val s = HashMap<String, Int?>()
s["239"] = 239
return if (s["239"] == 239) "OK" else "Fail"
}