diff options
Diffstat (limited to 'src/go/types/predicates.go')
-rw-r--r-- | src/go/types/predicates.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/go/types/predicates.go b/src/go/types/predicates.go index 2f4ef9dace..d4055bb0cc 100644 --- a/src/go/types/predicates.go +++ b/src/go/types/predicates.go @@ -312,16 +312,14 @@ func identical(x, y Type, cmpTags bool, p *ifacePair) bool { return false } - if nargs := len(xargs); nargs > 0 { + if len(xargs) > 0 { // Instances are identical if their original type and type arguments // are identical. if !Identical(x.orig, y.orig) { return false } - for i := 0; i < nargs; i++ { - xa := xargs[i] - ya := yargs[i] - if !Identical(xa, ya) { + for i, xa := range xargs { + if !Identical(xa, yargs[i]) { return false } } |