Czar
07/04/2017, 8:34 AMfun dummy(input: List<Any>): Stream<SomeSpecificType> =
input.parallelStream().map {
when {
it is String -> SomeSpecificType(it)
else -> performActionWhichReturnsBoolean(it)
}
}.filter { it is SomeSpecificType }
This is colored red and shows following error: Type mismatch.
Required: Stream<SomeSpecificType>
Found: Stream<Serializable!>!
Is this a known issue? I googled around but couldn't find it.
This is not my real code of course, just something syntactically identical.