google / go-cmp

Package for comparing Go values in tests
BSD 3-Clause "New" or "Revised" License
4.08k stars 209 forks source link

Equal method matching panics under interesting situations #324

Open hugelgupf opened 1 year ago

hugelgupf commented 1 year ago

Example 1, panic: interface with Equal method, struct embeds other struct with Equal method. https://go.dev/play/p/LJ-oE6zu9ul (not exactly sure what makes this one tick)

Example 2, panic: pointer receiver for Equal, embedded in other struct: https://go.dev/play/p/UP22F8H36rx