Commit b594b8b0 authored by Matthew Dempsky's avatar Matthew Dempsky

cmd/compile: switch Eqtype and (*Type).Compare to use recvParamsResults

Change-Id: I5365b94b815bfb4795db643415c2df51fc815ea1
Reviewed-on: https://go-review.googlesource.com/20459
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: 's avatarDave Cheney <dave@cheney.net>
parent 6b59d618
......@@ -767,7 +767,7 @@ func eqtype1(t1, t2 *Type, assumedEqual map[typePair]struct{}) bool {
// Loop over structs: receiver, in, out.
case TFUNC:
for _, f := range [...]func(*Type) *Type{(*Type).Recv, (*Type).Results, (*Type).Params} {
for _, f := range recvParamsResults {
// Loop over fields in structs, ignoring argument names.
ta, ia := IterFields(f(t1))
tb, ib := IterFields(f(t2))
......
......@@ -423,7 +423,7 @@ func (t *Type) cmp(x *Type) ssa.Cmp {
return ssa.CMPeq
case TFUNC:
for _, f := range [...]func(*Type) *Type{(*Type).Recv, (*Type).Results, (*Type).Params} {
for _, f := range recvParamsResults {
// Loop over fields in structs, ignoring argument names.
ta, ia := IterFields(f(t))
tb, ib := IterFields(f(x))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment