mirror of git://gcc.gnu.org/git/gcc.git
reflect: Fix bug comparing struct field types.
From-SVN: r193395
This commit is contained in:
parent
c76b1db623
commit
7e03f00470
|
|
@ -1309,8 +1309,19 @@ func haveIdenticalUnderlyingType(T, V *commonType) bool {
|
|||
for i := range t.fields {
|
||||
tf := &t.fields[i]
|
||||
vf := &v.fields[i]
|
||||
if tf.name != vf.name || tf.pkgPath != vf.pkgPath ||
|
||||
tf.typ != vf.typ || tf.tag != vf.tag || tf.offset != vf.offset {
|
||||
if tf.name != vf.name && (tf.name == nil || vf.name == nil || *tf.name != *vf.name) {
|
||||
return false
|
||||
}
|
||||
if tf.pkgPath != vf.pkgPath && (tf.pkgPath == nil || vf.pkgPath == nil || *tf.pkgPath != *vf.pkgPath) {
|
||||
return false
|
||||
}
|
||||
if tf.typ != vf.typ {
|
||||
return false
|
||||
}
|
||||
if tf.tag != vf.tag && (tf.tag == nil || vf.tag == nil || *tf.tag != *vf.tag) {
|
||||
return false
|
||||
}
|
||||
if tf.offset != vf.offset {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue