-
Notifications
You must be signed in to change notification settings - Fork 21
immutable.HashMap.size() can be induced to return -1 #768
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
Comments
Imported From: https://issues.scala-lang.org/browse/SI-768?orig=1 |
@odersky said: |
@ijuma said: val m = new collection.immutable.HashSet[Int]
println(m.size)
m + 1
println(m.size) prints exactly the same as the report here. The fix only seems to fix HashMap. |
@odersky said: |
@ijuma said: |
@ijuma said: s += tableSize instead of s += m.tableSize So, once you fix the "fix", feel free to close #454 too. :) |
@ijuma said: |
@odersky said: |
I'm using 2.7.1-RC1. this code:
prints:
shouldn't the -1 be 0?
The text was updated successfully, but these errors were encountered: