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
stringer not used for map keys #141
Comments
Not calling It seems that enabling this is as trivial as removing this line: Line 211 in 6f77996
However, I can't remember why I would have set that explicitly to true. |
crawshaw
added a commit
to crawshaw/go-cmp
that referenced
this issue
May 26, 2019
This reverts a change introduced in commit 2940eda where the cmp package stopped calling the String method when printing map keys. The motivation for the change is unclear, indeed there was a pre-existing test that String was called on map keys that the commit changed. Fixes google#141
dsnet
pushed a commit
that referenced
this issue
May 27, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When rendering type
T
, the cmp package uses the String method for slice values, but not for map keys.Outputs:
Try it here: https://play.golang.org/p/GS8f7ABvd61
If you agree this is a bug, I can take a crack at fixing it.
The text was updated successfully, but these errors were encountered: