Files
kotlin-fork/idea/testData/inspectionsLocal/suspiciousCollectionReassignment/hasError_ni.kt
T
Mikhail Zarechenskiy 191fb02bf6 [NI] Consider intersection type with number type as Nothing
Currently, only for "in": In<in Int & A> == In<in Nothing> == In<*>

 #KT-37302 Fixed
2020-03-23 16:39:21 +03:00

9 lines
261 B
Kotlin
Vendored

// PROBLEM: none
// WITH_RUNTIME
// ERROR: Type mismatch: inferred type is List<{Comparable<*> & java.io.Serializable}> but List<String> was expected
// COMPILER_ARGUMENTS: -XXLanguage:+NewInference
fun test() {
var list = listOf("")
list <caret>+= 1
}