mirror of
https://github.com/golang/go
synced 2024-11-02 15:37:45 +00:00
reflect: fix stack overflow panic when using haveIdenticalUnderlyingType
This commit is contained in:
parent
163de19b47
commit
4d4217f0c1
1 changed files with 1 additions and 4 deletions
|
@ -1599,7 +1599,7 @@ func haveIdenticalType(T, V Type, cmpTags bool) bool {
|
|||
return T == V
|
||||
}
|
||||
|
||||
if T.Name() != V.Name() || T.Kind() != V.Kind() {
|
||||
if T.Name() != V.Name() || T.Kind() != V.Kind() || T.PkgPath() != V.PkgPath() {
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -1679,9 +1679,6 @@ func haveIdenticalUnderlyingType(T, V *rtype, cmpTags bool) bool {
|
|||
if tf.name.name() != vf.name.name() {
|
||||
return false
|
||||
}
|
||||
if tf.typ.Kind() != Struct && tf.typ.str != vf.typ.str {
|
||||
return false
|
||||
}
|
||||
if !haveIdenticalType(tf.typ, vf.typ, cmpTags) {
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue