From: Aliaksandr Valialkin Date: Thu, 12 May 2016 12:27:30 +0000 (+0300) Subject: go/types: fix certain vet warnings X-Git-Tag: go1.7beta1~232 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ccf2c019921999f49ba2ab8cbfe70ebecc986f46;p=gostls13.git go/types: fix certain vet warnings Updates #11041 Change-Id: I4e1c670d2b7fc04927d77c6f933cee39b7d48b6e Reviewed-on: https://go-review.googlesource.com/23083 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/go/types/resolver.go b/src/go/types/resolver.go index 1536df5bf1..992188f0ff 100644 --- a/src/go/types/resolver.go +++ b/src/go/types/resolver.go @@ -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): diff --git a/src/go/types/stmt.go b/src/go/types/stmt.go index e301f71159..5764430b1b 100644 --- a/src/go/types/stmt.go +++ b/src/go/types/stmt.go @@ -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 }