Files
kotlin-fork/compiler/testData/diagnostics/tests/j+k/collectorInference.kt
T
2019-04-25 16:19:35 +03:00

15 lines
351 B
Kotlin
Vendored

// !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?>>() }
}