Skip to content

Commit

Permalink
lang: ast: Clear env on ExprCall.Graph
Browse files Browse the repository at this point in the history
When calling a function, the function is either a parameter, a top-level
variable, a builtin, or a func. None of those should have access to the
enclosing function parameters (not the call site's arguments) which are
in scope at the call site.
  • Loading branch information
gelisam authored and purpleidea committed Dec 1, 2023
1 parent c5a06df commit 23e5edf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lang/ast/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -8182,7 +8182,7 @@ func (obj *ExprCall) Graph(env map[string]interfaces.Func) (*pgraph.Graph, inter
}

// Add the vertex which produces the FuncValue.
exprGraph, funcValueFunc, err := obj.expr.Graph(env)
exprGraph, funcValueFunc, err := obj.expr.Graph(map[string]interfaces.Func{})
if err != nil {
return nil, nil, errwrap.Wrapf(err, "could not get the graph for the expr pointer")
}
Expand Down

0 comments on commit 23e5edf

Please sign in to comment.