diff options
Diffstat (limited to 'src/library/scala/collection/immutable/Stream.scala')
-rw-r--r-- | src/library/scala/collection/immutable/Stream.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/library/scala/collection/immutable/Stream.scala b/src/library/scala/collection/immutable/Stream.scala index b6145ecaf0..2c90f8eb6b 100644 --- a/src/library/scala/collection/immutable/Stream.scala +++ b/src/library/scala/collection/immutable/Stream.scala @@ -146,6 +146,10 @@ self => ) else super.++(that)(bf) + override def +:[B >: A, That](elem: B)(implicit bf: CanBuildFrom[Stream[A], B, That]): That = + if (isStreamBuilder(bf)) asThat(cons(elem, this)) + else super.+:(elem)(bf) + /** * Create a new stream which contains all intermediate results of applying the operator * to subsequent elements left to right. |