cmd/vet: fix build

Broken by CLs 10994 and 10800.

Fixes golang/go#11194.

Change-Id: Ic071fae6bf7e8ac9518d84c74c98d1d7233c2025
Reviewed-on: https://go-review.googlesource.com/11004
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2015-06-12 16:44:52 -07:00 committed by Robert Griesemer
parent b5429ae521
commit 85ad76014a
2 changed files with 2 additions and 2 deletions

View File

@ -213,7 +213,7 @@ func checkShadowing(f *File, ident *ast.Ident) {
}
// obj.Parent.Parent is the surrounding scope. If we can find another declaration
// starting from there, we have a shadowed identifier.
_, shadowed := obj.Parent().Parent().LookupParent(obj.Name())
_, shadowed := obj.Parent().Parent().LookupParent(obj.Name(), obj.Pos())
if shadowed == nil {
return
}

View File

@ -32,7 +32,7 @@ func init() {
}
// func() string
var sigNoArgsStringResult = types.NewSignature(nil, nil, nil,
var sigNoArgsStringResult = types.NewSignature(nil, nil,
types.NewTuple(types.NewVar(token.NoPos, nil, "", types.Typ[types.String])),
false)