I am likely being very stupid in not realizing how to get round this issue. The code:
fun usingStreamSequence(l:List<Int>):List<Int> {
return l.stream()
.map(::f1)
.map(::f2)
.map(::f3)
.collect(Collectors.toList())
}
give the following error on the collect call:
Type inference failed. Expected type mismatch: inferred type is (MutableList<in Int!>..List<Any?>?) but List<Int> was expected
I am using IDEA 2016.02 EAP with the Kotlin 1.1.0-dev plugin but the project is a Gradle one and uses the 1.0.2 version of Kotlin. All on Debian Sid.