Files
kotlin-fork/compiler/testData/cli/metadata/getOrDefault.kt
T
Mikhail Glukhikh 7599ff0ef1 K2: add a reproducer for getOrDefault false negative in metadata compilation
This case is similar to KT-57268 in early JDKs
2024-01-30 19:44:00 +00:00

3 lines
121 B
Kotlin
Vendored

// This should not compile: only JVM 1.8+ contains getOrDefault
fun foo(map: Map<String, Int>) = map.getOrDefault("", 0)