Files
kotlin-fork/compiler/testData/diagnostics/tests/j+k/collectorInference.kt
T

16 lines
368 B
Kotlin
Vendored

// FIR_IDENTICAL
// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// SKIP_TXT
// FULL_JDK
import java.util.stream.Collectors
import java.util.stream.Stream
fun test(a: Stream<String>) {
a.collect(Collectors.toList()) checkType { _<MutableList<String>>() }
// actually the inferred type is platform
a.collect(Collectors.toList()) checkType { _<List<String?>>() }
}