Skip to content

Commit c3b517f

Browse files
authored
Merge pull request scala#6724 from xuwei-k/Stream-Deferrer
remove unnecessary thunk in Stream.Deferrer
2 parents 2614aa8 + 20421f5 commit c3b517f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/library/scala/collection/immutable/LazyList.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ object Stream extends LazyListFactory[Stream] {
839839
/** Construct a Stream consisting of a given first element followed by elements
840840
* from another Stream.
841841
*/
842-
def #:: [B >: A](elem: => B): Stream[B] = newCons(elem, l())
842+
def #:: [B >: A](elem: B): Stream[B] = new Cons(elem, l())
843843
/** Construct a Stream consisting of the concatenation of the given Stream and
844844
* another Stream.
845845
*/

0 commit comments

Comments
 (0)