From ccf2c019921999f49ba2ab8cbfe70ebecc986f46 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 12 May 2016 15:27:30 +0300 Subject: [PATCH] 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 --- src/go/types/resolver.go | 2 +- src/go/types/stmt.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 } -- 2.48.1