816d89e393
This commits introduces testdata changes, where NI behaviour strictly improved, after several previous fixes. For some tests, just WITH_NEW_INFERENCE directive was added. It indicates, that some of previous commits first introduced error in that test, and then some other commit fixed it (netting no overall testdata change). It is preferrably to keep those annotations until we will migrate to NI completely, to prevent unexpected regressions.
23 lines
631 B
Kotlin
Vendored
23 lines
631 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
// 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<!>)
|
|
}
|