Commit da32cef4 by Kyle Brandt Committed by GitHub

Expr: fix func argument panic (#29663)

would get wrong type for reflect
parent 785aa4df
...@@ -505,7 +505,7 @@ func (e *State) walkFunc(node *parse.FuncNode) (Results, error) { ...@@ -505,7 +505,7 @@ func (e *State) walkFunc(node *parse.FuncNode) (Results, error) {
case *parse.VarNode: case *parse.VarNode:
v = e.Vars[t.Name] v = e.Vars[t.Name]
case *parse.ScalarNode: case *parse.ScalarNode:
v = t.Float64 v = NewScalarResults(&t.Float64)
case *parse.FuncNode: case *parse.FuncNode:
v, err = e.walkFunc(t) v, err = e.walkFunc(t)
case *parse.UnaryNode: case *parse.UnaryNode:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment