cmd/vet: use changed types.LookupParent API (fix build)
LGTM=adonovan R=adonovan CC=golang-codereviews https://golang.org/cl/162080043
This commit is contained in:
parent
b10dfb99c5
commit
ea1477608d
|
@ -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 variable.
|
// starting from there, we have a shadowed variable.
|
||||||
shadowed := obj.Parent().Parent().LookupParent(obj.Name())
|
_, shadowed := obj.Parent().Parent().LookupParent(obj.Name())
|
||||||
if shadowed == nil {
|
if shadowed == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue