Files
kotlin-fork/compiler/testData/diagnostics/testsWithJava8/targetedBuiltIns/concurrentMapRemove.kt
T
Denis Zharkov 55c4f875c8 Use signatures instead of fq-names in special built-ins
It's necessary to distinguish overloads,
e.g. MutableMap.remove now has two versions
2016-04-29 15:08:54 +03:00

21 lines
499 B
Kotlin
Vendored

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