Files
kotlin-fork/compiler/testData/codegen/box/delegation/computeIfAbsent.kt
T
2023-12-26 10:18:19 +00:00

12 lines
225 B
Kotlin
Vendored

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