Files
kotlin-fork/compiler/testData/codegen/box/arrays/hashMap.kt
T
Anton Bannykh 8c6337f3f6 [JS IR BE]: support dynamic_var["foo"] = "bar"
Used EQ origin to detect. Added a test to check dynamic_var = "bar" case
is not affected
2018-10-10 13:43:22 +03:00

10 lines
223 B
Kotlin
Vendored

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"
}