Commit a42e8a80 authored by Robert Griesemer's avatar Robert Griesemer

go/ast: FuncType.Params may be nil (per AST documentation)

ast.Walk needs to check for it or it will crash.

R=r
CC=golang-dev
https://golang.org/cl/6852062
parent 8f82bff5
...@@ -158,7 +158,9 @@ func Walk(v Visitor, node Node) { ...@@ -158,7 +158,9 @@ func Walk(v Visitor, node Node) {
Walk(v, n.Fields) Walk(v, n.Fields)
case *FuncType: case *FuncType:
Walk(v, n.Params) if n.Params != nil {
Walk(v, n.Params)
}
if n.Results != nil { if n.Results != nil {
Walk(v, n.Results) Walk(v, n.Results)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment