go/printer: don't crash if ast.FuncType.Params is nil
The go/ast comment for FuncType.Params says that the field may be nil. Make sure the printer accepts such a value. The go/parser always sets the field (to provide parenthesis position information), but a program creating a Go AST from scatch may not. Added corresponding test case. Fixes #3870. R=golang-dev, r CC=golang-dev https://golang.org/cl/6448060
Showing
Please
register
or
sign in
to comment