-
Notifications
You must be signed in to change notification settings - Fork 21
Immutable set size incorrect after filter #454
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
Milestone
Comments
Imported From: https://issues.scala-lang.org/browse/SI-454?orig=1
|
@ijuma said: |
@ijuma said: |
@ijuma said: |
@odersky said: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Calling filter on an immutable set with 5 elements causes it to report the wrong size initially. Iteration over the set seems to fix the problem. Here's a simple JUnit4 test case:
package test;
import org.junit.Test
import org.junit.Assert._
class SetTest {
}
The error is the following:
testSetSize(test.SetTest) Time elapsed: 0.066 sec <<< FAILURE!
java.lang.AssertionError: expected:<5> but was:<9>
at org.junit.Assert.fail(Assert.java:74)
at org.junit.Assert.failNotEquals(Assert.java:448)
at org.junit.Assert.assertEquals(Assert.java:102)
at org.junit.Assert.assertEquals(Assert.java:117)
at test.SetTest.testSetSize(SetTest.scala:14)
Reproduced with Scala 2.6.1 and JDK 6 update 4.
This is a very hard to debug issue, so I think it should be given high priority. Thanks.
The text was updated successfully, but these errors were encountered: