• Elias Naur's avatar
    text/template: Make function call builtin handle nil errors correctly · 83348a13
    Elias Naur authored
    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
    83348a13
Name
Last commit
Last update
..
parse Loading commit data...
testdata Loading commit data...
doc.go Loading commit data...
example_test.go Loading commit data...
examplefiles_test.go Loading commit data...
examplefunc_test.go Loading commit data...
exec.go Loading commit data...
exec_test.go Loading commit data...
funcs.go Loading commit data...
helper.go Loading commit data...
multi_test.go Loading commit data...
template.go Loading commit data...