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

Unexpected return value for Range(x,y).init #4748

Closed
scabug opened this issue Jun 30, 2011 · 2 comments
Closed

Unexpected return value for Range(x,y).init #4748

scabug opened this issue Jun 30, 2011 · 2 comments
Assignees

Comments

@scabug
Copy link

scabug commented Jun 30, 2011

I would expect

Range(1,30).init
scala.collection.immutable.Range = Range(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28)

Instead I get
scala.collection.immutable.Range = Range(1)

This works:
Range(1,30).toList.init
List[Int] = List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 1
8, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28)

@scabug
Copy link
Author

scabug commented Jun 30, 2011

Imported From: https://issues.scala-lang.org/browse/SI-4748?orig=1
Reporter: Montez Fitzpatrick (m15k)
Affected Versions: 2.9.0

@scabug
Copy link
Author

scabug commented Jun 30, 2011

Commit Message Bot (anonymous) said:
(extempore in r25209) Fix for unfortunate bug in Range.init. Closes #4748, no review.

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