Files
kotlin-fork/compiler/testData/codegen/box/delegation/computeIfAbsent.kt
T
2023-11-07 12:30:45 +00:00

11 lines
193 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_STDLIB
// FULL_JDK
class MyMap : MutableMap<Int, String> by hashMapOf()
fun box(): String {
val map = MyMap()
return map.computeIfAbsent(42) { "OK" }
}