-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
reflect: MakeMap() and not native map type wrong behavior #37716
Comments
I forgot adding a final:
prints:
:) |
Strange. I can reproduce with 1.14 on darwin/amd64. |
Looks like a hash function mismatch. |
Here's a somewhat simpler reproducer, including at tip.
This should print |
Change https://golang.org/cl/222357 mentions this issue: |
@gopherbot please open a backport issue for 1.14. |
Backport issue(s) opened: #37721 (for 1.14). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
What did you see instead?
Hints
var out Final
byvar out map[int64]string
it works;var out = map[int64]string{}
works, butvar out = Final{}
still fails;type Final map[string]string
(string key instead of int64 key), and replacing allint64(0)
occurrences by"0"
, works.The text was updated successfully, but these errors were encountered: