Skip to content

Reverse on SequenceView throws StackOverFlowError #2548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
scabug opened this issue Oct 30, 2009 · 3 comments
Closed

Reverse on SequenceView throws StackOverFlowError #2548

scabug opened this issue Oct 30, 2009 · 3 comments
Assignees

Comments

@scabug
Copy link

scabug commented Oct 30, 2009

As summarized above, calling reverse on a SequenceView throws a StackOverFlowError. Example:

scala> List(1,2,3,4,5,6).view.reverse
java.lang.StackOverflowError
        at scala.collection.generic.SequenceViewTemplate$$$$anon$$8.<init>(SequenceViewTemplate.scala:136)
        at scala.collection.generic.SequenceViewTemplate$$class.newReversed(SequenceViewTemplate.scala:136)
        at scala.collection.generic.SequenceTemplate$$$$anon$$3.newReversed(SequenceTemplate.scala:433)
        at scala.collection.generic.SequenceViewTemplate$$class.reverse(Seq...

Observed on scala-2.8.0.r18997-b20091009021954, downloaded from nightly.

@scabug
Copy link
Author

scabug commented Oct 30, 2009

Imported From: https://issues.scala-lang.org/browse/SI-2548?orig=1
Reporter: @dcsobral

@scabug
Copy link
Author

scabug commented Dec 14, 2009

@paulp said:
I would need advice on how to deal with this. I'm finding the coupling between X, XLike, and XView blocks any interesting change I attempt to make. In particular I thought the loop ought to be cut off by overriding view in the *View classes, but with each of Coll, Repr, and This waving their own list of demands, I didn't see how to get anywhere that way.

@scabug
Copy link
Author

scabug commented Dec 22, 2009

@axel22 said:
(In r20288) fixed #2548 - reverse, reverseIterator for views bug. Also - reverseMap for views now should work.
review by phaller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants