Skip to content

IndexedSeqOptimized: tailrec bugs #912

@DarkDimius

Description

@DarkDimius
/scala-scala/src/library/scala/collection/IndexedSeqOptimized.scala:58: error: Cannot rewrite recursive call: it changes type of 'this' on a polymorphic recursive call
    if (start == end) z
    ^
./scala-scala/src/library/scala/collection/IndexedSeqOptimized.scala:57: error: TailRec optimisation not applicable, method not tail recursive
  private def foldl[B](start: Int, end: Int, z: B, op: (B, A) => B): B =
              ^
./scala-scala/src/library/scala/collection/IndexedSeqOptimized.scala:63: error: Cannot rewrite recursive call: it changes type of 'this' on a polymorphic recursive call
    if (start == end) z
    ^
./scala-scala/src/library/scala/collection/IndexedSeqOptimized.scala:62: error: TailRec optimisation not applicable, method not tail recursive
  private def foldr[B](start: Int, end: Int, z: B, op: (A, B) => B): B =
              ^

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions