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

ArrayStack.apply creates unusable ArrayStack #4963

Closed
scabug opened this issue Sep 2, 2011 · 2 comments
Closed

ArrayStack.apply creates unusable ArrayStack #4963

scabug opened this issue Sep 2, 2011 · 2 comments
Assignees

Comments

@scabug
Copy link

scabug commented Sep 2, 2011

val x = ArrayStack[Int] // Uses ArrayStack apply(elem: T*) method
When passed no elements creates ArrayStack with T[0]
afterwards arraygrow doubles the number of elements which mean still T[0]

Not a big a deal, but minimum size of 1 needs to be insured

@scabug
Copy link
Author

scabug commented Sep 2, 2011

Imported From: https://issues.scala-lang.org/browse/SI-4963?orig=1
Reporter: Dmitry Zaslavsky (dimkaz25)
Affected Versions: 2.9.0-1

@scabug
Copy link
Author

scabug commented Oct 29, 2011

Commit Message Bot (anonymous) said:
(extempore in r25910) Fix ArrayStack.growArray at boundary.

Doubling a 0-size array is still 0, that's not growing.
Closes #4963, no review.

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

No branches or pull requests

2 participants