mirror of
https://github.com/golang/go
synced 2024-11-23 17:00:07 -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:
|
||||
Walk(v, n.Key)
|
||||
if n.Key != nil {
|
||||
Walk(v, n.Key)
|
||||
}
|
||||
if n.Value != nil {
|
||||
Walk(v, n.Value)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user