aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2021-11-30 14:15:02 -0700
committerBen Burdette <bburdette@gmail.com>2021-11-30 14:15:02 -0700
commite82aec4efcd06cbd60d57f401fb7e93ab595128c (patch)
treee2c9a7311f1aaa7ac08576648f0749845f905fe0 /src/libexpr/eval.cc
parent64c4ba8f66c7569478fd5f19ebb72c9590cc2b45 (diff)
fix merge issues
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r--src/libexpr/eval.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index a20123f34..8737930b5 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -591,7 +591,7 @@ Value * EvalState::addConstant(const string & name, Value & v)
void EvalState::addConstant(const string & name, Value * v)
{
- staticBaseEnv.vars.emplace_back(symbols.create(name), baseEnvDispl);
+ staticBaseEnv->vars.emplace_back(symbols.create(name), baseEnvDispl);
baseEnv.values[baseEnvDispl++] = v;
string name2 = string(name, 0, 2) == "__" ? string(name, 2) : name;
baseEnv.values[0]->attrs->push_back(Attr(symbols.create(name2), v));
@@ -1459,7 +1459,8 @@ void EvalState::callFunction(Value & fun, size_t nrArgs, Value * * args, Value &
user. */
for (auto & i : *args[0]->attrs)
if (lambda.formals->argNames.find(i.name) == lambda.formals->argNames.end())
- throwTypeError(pos, "%1% called with unexpected argument '%2%'", lambda, i.name);
+ throwTypeError(pos, "%1% called with unexpected argument '%2%'",
+ lambda, i.name, *fun.lambda.env, &lambda);
abort(); // can't happen
}
}