mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 08:31:35 +00:00
Use PlatformDependent annotation to guarantee it's only be available for JDK8 Also adjust type-safe bridges and mutable collection stubs generation
20 lines
595 B
Kotlin
Vendored
20 lines
595 B
Kotlin
Vendored
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<!>)
|
|
}
|