Skip to content

LazyList.from(1) match { case LazyList(x, xs @ _*) => xs } never terminates #11687

Closed
scala/scala
#8340
@smarter

Description

@smarter

Same for Stream.from(1).view.toSeq which did terminate in 2.12. The behavior on unapply arises because we go through UnapplySeqWrapper#drop: https://github.com/scala/scala/blob/f23f96c36a3cc0a44a60d28bac0200873686c410/src/library/scala/collection/Factory.scala#L315

/cc @NthPortal, the definitive expert on LazyList :).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions