diff --git a/cmd/vet/shadow.go b/cmd/vet/shadow.go index 34e5db90..fa680a03 100644 --- a/cmd/vet/shadow.go +++ b/cmd/vet/shadow.go @@ -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 } diff --git a/cmd/vet/unused.go b/cmd/vet/unused.go index db988fe1..b9d7b65f 100644 --- a/cmd/vet/unused.go +++ b/cmd/vet/unused.go @@ -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)