go/types: fix certain vet warnings

Updates #11041

Change-Id: I4e1c670d2b7fc04927d77c6f933cee39b7d48b6e
Reviewed-on: https://go-review.googlesource.com/23083
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Aliaksandr Valialkin 2016-05-12 15:27:30 +03:00 committed by Brad Fitzpatrick
parent a8a2b38fb9
commit ccf2c01992
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ func (check *Checker) arityMatch(s, init *ast.ValueSpec) {
// TODO(gri) avoid declared but not used error here
} else {
// init exprs "inherited"
check.errorf(s.Pos(), "extra init expr at %s", init.Pos())
check.errorf(s.Pos(), "extra init expr at %s", check.fset.Position(init.Pos()))
// TODO(gri) avoid declared but not used error here
}
case l > r && (init != nil || r != 1):

View File

@ -123,7 +123,7 @@ func (check *Checker) multipleDefaults(list []ast.Stmt) {
}
if d != nil {
if first != nil {
check.errorf(d.Pos(), "multiple defaults (first at %s)", first.Pos())
check.errorf(d.Pos(), "multiple defaults (first at %s)", check.fset.Position(first.Pos()))
} else {
first = d
}