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

scala.collection.immutable.HashSet#- returns broken Set #8264

Closed
scabug opened this issue Feb 11, 2014 · 4 comments
Closed

scala.collection.immutable.HashSet#- returns broken Set #8264

scabug opened this issue Feb 11, 2014 · 4 comments

Comments

@scabug
Copy link

scabug commented Feb 11, 2014

Welcome to Scala version 2.11.0-M8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_51).
Type in expressions to have them evaluated.Type :help for more information.

scala> Set(-2147483648, 1, -45023380, -1, 1971207058, -54312241, -234243394) - -1
res0: scala.collection.immutable.Set[Int] = Set(-2147483648, 1, -45023380, 1971207058, -54312241, -234243394)
scala> res0 == res0.toList.toSet
res1: Boolean = false

scala> res0.toList.toSet == res0
res2: Boolean = true
@scabug
Copy link
Author

scabug commented Feb 11, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8264?orig=1
Reporter: kenji yoshida
Affected Versions: 2.11.0-M8

@scabug
Copy link
Author

scabug commented Feb 11, 2014

@retronym said:
Rex, could you take a look at this ahead of 2.11?

@scabug
Copy link
Author

scabug commented Feb 11, 2014

kenji yoshida said:
with 2.11.0-20140210-135824-59fc37ade7

Welcome to Scala version 2.11.0-20140210-135824-59fc37ade7 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_51).
Type in expressions to have them evaluated.
Type :help for more information.

scala> Set(-2147483648, 1, -45023380, -1, 1971207058, -54312241, -234243394) - -1
res0: scala.collection.immutable.Set[Int] = Set(-2147483648, 1, -45023380, 1971207058, -54312241, -234243394)

scala> res0.toList.toSet == res0
res1: Boolean = true

scala> res0 == res0.toList.toSet
res2: Boolean = false

@scabug
Copy link
Author

scabug commented Feb 14, 2014

@Ichoran said:
scala/scala#3527

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