Files
kotlin-fork/compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.kt
T
Denis.Zharkov 2ecba6ac39 Remove WITH_NEW_INFERENCE directive from all tests
This directive anyway does not make test run twice with OI, and with NI
It only once run the test with specific settings (// LANGUAGE)
and ignores irrelevant (OI or NI tags)
2021-05-25 13:28:26 +03:00

22 lines
608 B
Kotlin
Vendored

// FULL_JDK
import java.util.concurrent.*
val concurrent: ConcurrentMap<String, Int> = null!!
val concurrentHash: ConcurrentHashMap<String, Int> = null!!
fun foo() {
concurrent.remove("", 1)
concurrent.remove("", <!TYPE_MISMATCH!>""<!>)
concurrentHash.remove("", 1)
concurrentHash.remove("", <!TYPE_MISMATCH!>""<!>)
// Flexible types
concurrent.remove(null, 1)
concurrent.remove(null, null)
// @PurelyImplements
concurrentHash.remove(<!NULL_FOR_NONNULL_TYPE!>null<!>, 1)
concurrentHash.remove(<!NULL_FOR_NONNULL_TYPE!>null<!>, <!NULL_FOR_NONNULL_TYPE!>null<!>)
}