From 5f3281139d2173f4d742aaf3ed9ba57a93b46737 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Mart=C3=AD?= Date: Sun, 5 Mar 2017 13:42:55 +0100 Subject: [PATCH] go/types: remove unused field parameter Found by github.com/mvdan/unparam. Change-Id: Ie26e963176eb7afb35d16fed5cbca6530f7731c3 Reviewed-on: https://go-review.googlesource.com/37832 Reviewed-by: Robert Griesemer Run-TryBot: Robert Griesemer TryBot-Result: Gobot Gobot --- src/go/types/typexpr.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/go/types/typexpr.go b/src/go/types/typexpr.go index 1e906fc4d8..5f1587bf0f 100644 --- a/src/go/types/typexpr.go +++ b/src/go/types/typexpr.go @@ -623,7 +623,7 @@ func (check *Checker) structType(styp *Struct, e *ast.StructType, path []*TypeNa // current field typ and tag var typ Type var tag string - add := func(field *ast.Field, ident *ast.Ident, anonymous bool, pos token.Pos) { + add := func(ident *ast.Ident, anonymous bool, pos token.Pos) { if tag != "" && tags == nil { tags = make([]string, len(fields)) } @@ -646,7 +646,7 @@ func (check *Checker) structType(styp *Struct, e *ast.StructType, path []*TypeNa if len(f.Names) > 0 { // named fields for _, name := range f.Names { - add(f, name, false, name.Pos()) + add(name, false, name.Pos()) } } else { // anonymous field @@ -684,7 +684,7 @@ func (check *Checker) structType(styp *Struct, e *ast.StructType, path []*TypeNa continue } } - add(f, name, true, pos) + add(name, true, pos) } } -- 2.48.1