text/template: Make function call builtin handle nil errors correctly
The call builtin unconditionally tries to convert a second return value from a function to the error type. This fails in case nil is returned, effectively making call useless for functions returning two values. This CL adds a nil check for the second return value, and adds a test. Note that for regular function and method calls the nil error case is handled correctly and is verified by a test. R=r CC=golang-dev https://golang.org/cl/12804043
Showing
Please
register
or
sign in
to comment