-
Notifications
You must be signed in to change notification settings - Fork 2
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
panic diffing map with struct value type #10
Comments
This change to diff_test.go produces the same result:
--- a/diff_test.go
+++ b/diff_test.go
@@ -62,6 +62,11 @@ func TestEqual(t *testing.T) {
ab(make(chan int)),
ab(unsafe.Pointer(new(int))),
ab(unsafe.Pointer(nil)),
+ ab(map[int]struct{ F int }{0: {}}),
+ {
+ map[int]struct{ F int }{0: {}},
+ map[int]struct{ F int }{0: {}},
+ },
} |
Changing the value to a pointer causes the test to pass:
|
bmizerany
added a commit
to bmizerany/diff
that referenced
this issue
May 18, 2022
Closed
bmizerany
added a commit
to bmizerany/diff
that referenced
this issue
May 18, 2022
kr
pushed a commit
that referenced
this issue
May 18, 2022
kr
pushed a commit
that referenced
this issue
Oct 9, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Go Version
Current kr.dev/diff commit 6c69dcc
I'm using diff.Test with a
map[string]someStruct
and seeing this panic:A minimal test to reproduce:
The text was updated successfully, but these errors were encountered: