mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
add test, fix bug: structs that differ in their
first field were not being handled correctly because the visited map did not include the type. R=r OCL=31006 CL=31006
This commit is contained in:
parent
25706fec19
commit
a439f66228
3 changed files with 37 additions and 10 deletions
|
|
@ -16,7 +16,7 @@ import (
|
|||
type Addr unsafe.Pointer
|
||||
|
||||
func equalType(a, b Type) bool {
|
||||
return a.String() == b.String()
|
||||
return a.Kind() == b.Kind() && a.String() == b.String()
|
||||
}
|
||||
|
||||
// Value is the generic interface to reflection values. Once its Kind is known,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue