Commit ccf2c019 authored by Aliaksandr Valialkin's avatar Aliaksandr Valialkin Committed by Brad Fitzpatrick

go/types: fix certain vet warnings

Updates #11041

Change-Id: I4e1c670d2b7fc04927d77c6f933cee39b7d48b6e
Reviewed-on: https://go-review.googlesource.com/23083Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent a8a2b38f
...@@ -67,7 +67,7 @@ func (check *Checker) arityMatch(s, init *ast.ValueSpec) { ...@@ -67,7 +67,7 @@ func (check *Checker) arityMatch(s, init *ast.ValueSpec) {
// TODO(gri) avoid declared but not used error here // TODO(gri) avoid declared but not used error here
} else { } else {
// init exprs "inherited" // 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 // TODO(gri) avoid declared but not used error here
} }
case l > r && (init != nil || r != 1): case l > r && (init != nil || r != 1):
......
...@@ -123,7 +123,7 @@ func (check *Checker) multipleDefaults(list []ast.Stmt) { ...@@ -123,7 +123,7 @@ func (check *Checker) multipleDefaults(list []ast.Stmt) {
} }
if d != nil { if d != nil {
if first != 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 { } else {
first = d first = d
} }
......
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