mirror of
https://github.com/golang/go
synced 2024-11-23 19:20:03 -07:00
go/ast: fix walk to handle "for range x"
LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/117790043
This commit is contained in:
parent
79b106ec62
commit
deae10e038
@ -275,7 +275,9 @@ func Walk(v Visitor, node Node) {
|
||||
Walk(v, n.Body)
|
||||
|
||||
case *RangeStmt:
|
||||
if n.Key != nil {
|
||||
Walk(v, n.Key)
|
||||
}
|
||||
if n.Value != nil {
|
||||
Walk(v, n.Value)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user