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:
parent
b5429ae521
commit
85ad76014a
|
@ -213,7 +213,7 @@ func checkShadowing(f *File, ident *ast.Ident) {
|
||||||
}
|
}
|
||||||
// obj.Parent.Parent is the surrounding scope. If we can find another declaration
|
// obj.Parent.Parent is the surrounding scope. If we can find another declaration
|
||||||
// starting from there, we have a shadowed identifier.
|
// 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 {
|
if shadowed == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// func() string
|
// 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])),
|
types.NewTuple(types.NewVar(token.NoPos, nil, "", types.Typ[types.String])),
|
||||||
false)
|
false)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue