Don’t mask the named return values

The defer function is expecting an expression value, not a nil value, and therefore we shouldn’t override the named return values in the function.
This commit is contained in:
Tobie Morgan Hitchcock 2018-04-20 23:49:45 +01:00
parent fb256df42b
commit abe117b7d3

View file

@ -854,7 +854,7 @@ func (p *parser) parsePath(expr ...Expr) (path *PathExpression, err error) {
part, err = p.parseStep()
if err != nil {
return nil, err
return
}
if part == nil {
@ -877,7 +877,7 @@ func (p *parser) parsePath(expr ...Expr) (path *PathExpression, err error) {
join, err = p.parseJoin()
if err != nil {
return nil, err
return
}
if join == nil {
@ -893,7 +893,7 @@ func (p *parser) parsePath(expr ...Expr) (path *PathExpression, err error) {
part, err = p.parseStep()
if err != nil {
return nil, err
return
}
if part == nil {