Skip to content
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

Inconsistent stream pattern matching behavior #7142

Closed
scabug opened this issue Feb 18, 2013 · 2 comments
Closed

Inconsistent stream pattern matching behavior #7142

scabug opened this issue Feb 18, 2013 · 2 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Feb 18, 2013

scala> val stream = Stream.iterate(0) { x => x + 1 }
stream: scala.collection.immutable.Stream[Int] = Stream(0, ?)

scala> val head #:: tail = stream
head: Int = 0
tail: scala.collection.immutable.Stream[Int] = Stream(1, ?)

scala> val Stream(head, tail@_*) = stream
head: Int = 0
tail: Seq[Int] = Stream(1, 2, ?)

The custom extractor #:: is doing what I'd expect; the standard unapplySeq isn't.

@scabug
Copy link
Author

scabug commented Feb 18, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7142?orig=1
Reporter: Dan Rosen (mergeconflict)

@scabug
Copy link
Author

scabug commented Jun 28, 2014

@Ichoran said:
Was already fixed. Not sure when; not worth the time to track it down.

@scabug scabug closed this as completed Jun 28, 2014
@scabug scabug added the quickfix label Apr 7, 2017
@scabug scabug added this to the 2.11.1 milestone Apr 7, 2017
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