Skip to content

Commit ccf2c01

Browse files
valyalabradfitz
authored andcommitted
go/types: fix certain vet warnings
Updates #11041 Change-Id: I4e1c670d2b7fc04927d77c6f933cee39b7d48b6e Reviewed-on: https://go-review.googlesource.com/23083 Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent a8a2b38 commit ccf2c01

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/go/types/resolver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (check *Checker) arityMatch(s, init *ast.ValueSpec) {
6767
// TODO(gri) avoid declared but not used error here
6868
} else {
6969
// init exprs "inherited"
70-
check.errorf(s.Pos(), "extra init expr at %s", init.Pos())
70+
check.errorf(s.Pos(), "extra init expr at %s", check.fset.Position(init.Pos()))
7171
// TODO(gri) avoid declared but not used error here
7272
}
7373
case l > r && (init != nil || r != 1):

src/go/types/stmt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func (check *Checker) multipleDefaults(list []ast.Stmt) {
123123
}
124124
if d != nil {
125125
if first != nil {
126-
check.errorf(d.Pos(), "multiple defaults (first at %s)", first.Pos())
126+
check.errorf(d.Pos(), "multiple defaults (first at %s)", check.fset.Position(first.Pos()))
127127
} else {
128128
first = d
129129
}

0 commit comments

Comments
 (0)