mirror of https://github.com/golang/go.git
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
This commit is contained in:
parent
8f82bff545
commit
a42e8a8086
|
|
@ -158,7 +158,9 @@ func Walk(v Visitor, node Node) {
|
|||
Walk(v, n.Fields)
|
||||
|
||||
case *FuncType:
|
||||
Walk(v, n.Params)
|
||||
if n.Params != nil {
|
||||
Walk(v, n.Params)
|
||||
}
|
||||
if n.Results != nil {
|
||||
Walk(v, n.Results)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue