1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

incorporate PosIdx changes, symbol changes.

This commit is contained in:
Ben Burdette 2022-04-29 10:02:17 -06:00
parent 6e19947993
commit 2a5632c70d
8 changed files with 204 additions and 125 deletions

View file

@ -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);
}