Commit 5f328113 authored by Daniel Martí's avatar Daniel Martí Committed by Robert Griesemer

go/types: remove unused field parameter

Found by github.com/mvdan/unparam.

Change-Id: Ie26e963176eb7afb35d16fed5cbca6530f7731c3
Reviewed-on: https://go-review.googlesource.com/37832Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 789c5255
......@@ -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)
}
}
......
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