diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-10-06 04:20:44 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-10-06 04:20:44 +0000 |
commit | dae4409071b827a539acd0f46f91f15cfa1e1a7d (patch) | |
tree | fd3a59d28da3481aebb76353bb630f090125769c /src/libexpr/primops.cc | |
parent | 45ca7c3e4b92bbafbfa8e30513c9dd3cfe76e3f1 (diff) | |
parent | 88a667e49e10af4a9e2daa51badbed63ad19d817 (diff) |
Merge remote-tracking branch 'upstream/master' into path-info
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r-- | src/libexpr/primops.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 9cfe3f402..2b304aab0 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -2236,6 +2236,10 @@ static RegisterPrimOp primop_catAttrs({ static void prim_functionArgs(EvalState & state, const Pos & pos, Value * * args, Value & v) { state.forceValue(*args[0], pos); + if (args[0]->type == tPrimOpApp || args[0]->type == tPrimOp) { + state.mkAttrs(v, 0); + return; + } if (args[0]->type != tLambda) throw TypeError({ .hint = hintfmt("'functionArgs' requires a function"), |