Files
kotlin-fork/compiler/testData/codegen/box/regressions/kt3442.kt
T
2021-10-01 17:18:49 +03:00

10 lines
234 B
Kotlin
Vendored

// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
fun box(): String {
val m = hashMapOf<String, String?>()
m.put("b", null)
val oldValue = m.getOrPut("b", { "Foo" })
return if (oldValue == "Foo") "OK" else "fail: $oldValue"
}