diff options
author | Ben Burdette <bburdette@protonmail.com> | 2022-04-29 10:02:17 -0600 |
---|---|---|
committer | Ben Burdette <bburdette@protonmail.com> | 2022-04-29 10:02:17 -0600 |
commit | 2a5632c70dcb686a7764c23a5f330fcb9a33c8a1 (patch) | |
tree | 95f4d9390881356c12270f6b23a8853e6ef585f7 /src/libexpr/nixexpr.cc | |
parent | 6e19947993119dec3c9fb9581150d1184948bae9 (diff) |
incorporate PosIdx changes, symbol changes.
Diffstat (limited to 'src/libexpr/nixexpr.cc')
-rw-r--r-- | src/libexpr/nixexpr.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc index efaeba7c6..c6e545729 100644 --- a/src/libexpr/nixexpr.cc +++ b/src/libexpr/nixexpr.cc @@ -437,11 +437,11 @@ void ExprLambda::bindVars(const EvalState & es, const std::shared_ptr<const Stat new StaticEnv( false, env.get(), (hasFormals() ? formals->formals.size() : 0) + - (!arg ? 0 : 1)); + (!arg ? 0 : 1))); Displacement displ = 0; - if (arg) newEnv.vars.emplace_back(arg, displ++); + if (arg) newEnv->vars.emplace_back(arg, displ++); if (hasFormals()) { for (auto & i : formals->formals) @@ -506,7 +506,7 @@ void ExprWith::bindVars(const EvalState & es, const std::shared_ptr<const Static staticenv = env; attrs->bindVars(es, env); - StaticEnv newEnv(true, &env); + auto newEnv = std::shared_ptr<StaticEnv>(new StaticEnv(true, env.get())); body->bindVars(es, newEnv); } |