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

immutable.HashMap behaviour change in 2.12.11 in bulk operations when overwriting an key #12047

Closed
retronym opened this issue Jun 22, 2020 · 0 comments

Comments

@retronym
Copy link
Member

Similar to #12039.

 for v in v2.12.10 v2.12.11 v2.13.2; do echo $v; scala-ref $v -nc -e 'case class C(a: Int)(override val toString: String); val c0l = C(0)("l"); val c0r = C(0)("r"); import collection.immutable._; println(HashMap((c0l, ())).++(HashMap((c0r, ()))))'; done
v2.12.10
Map(l -> ())
v2.12.11
Map(r -> ())
v2.13.2
warning: 1 deprecation; re-run with -deprecation for details
HashMap(l -> ())

The test cases should cover all the optimized HashMap/HashMap add operations that internally use merge. (e.g. via HashMapBuilder.++, HashMap.++, HashMap.++:

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

1 participant