Stream.filterIsInstance has wrong return type #KT-5097 Fixed

This commit is contained in:
Ilya Ryzhenkov
2014-05-28 15:53:56 +04:00
committed by Andrey Breslav
parent a2a93a3830
commit e6f5c7012c
2 changed files with 4 additions and 4 deletions
@@ -99,10 +99,10 @@ fun specialJVM(): List<GenericFunction> {
exclude(ArraysOfPrimitives, Strings)
doc(Streams) { "Returns a stream containing all elements that are instances of specified class" }
returns(Streams) { "Stream<T>" }
returns(Streams) { "Stream<R>" }
body(Streams) {
"""
return FilteringStream(this, true, { klass.isInstance(it) })
return FilteringStream(this, true, { klass.isInstance(it) }) as Stream<R>
"""
}
}