@@ -310,7 +310,7 @@ void ExprVar::bindVars(EvalState & es, const std::shared_ptr<const StaticEnv> &
310310 const StaticEnv * curEnv;
311311 Level level;
312312 int withLevel = -1 ;
313- for (curEnv = env.get (), level = 0 ; curEnv; curEnv = curEnv->up , level++) {
313+ for (curEnv = env.get (), level = 0 ; curEnv; curEnv = curEnv->up . get () , level++) {
314314 if (curEnv->isWith ) {
315315 if (withLevel == -1 ) withLevel = level;
316316 } else {
@@ -331,7 +331,7 @@ void ExprVar::bindVars(EvalState & es, const std::shared_ptr<const StaticEnv> &
331331 " undefined variable '%1%'" ,
332332 es.symbols [name]
333333 ).atPos (pos).debugThrow ();
334- for (auto * e = env.get (); e && !fromWith; e = e->up )
334+ for (auto * e = env.get (); e && !fromWith; e = e->up . get () )
335335 fromWith = e->isWith ;
336336 this ->level = withLevel;
337337}
@@ -379,7 +379,7 @@ std::shared_ptr<const StaticEnv> ExprAttrs::bindInheritSources(
379379 // and displacement, and nothing else is allowed to access it. ideally we'd
380380 // not even *have* an expr that grabs anything from this env since it's fully
381381 // invisible, but the evaluator does not allow for this yet.
382- auto inner = std::make_shared<StaticEnv>(nullptr , env. get () , 0 );
382+ auto inner = std::make_shared<StaticEnv>(nullptr , env, 0 );
383383 for (auto from : *inheritFromExprs)
384384 from->bindVars (es, env);
385385
@@ -393,7 +393,7 @@ void ExprAttrs::bindVars(EvalState & es, const std::shared_ptr<const StaticEnv>
393393
394394 if (recursive) {
395395 auto newEnv = [&] () -> std::shared_ptr<const StaticEnv> {
396- auto newEnv = std::make_shared<StaticEnv>(nullptr , env. get () , attrs.size ());
396+ auto newEnv = std::make_shared<StaticEnv>(nullptr , env, attrs.size ());
397397
398398 Displacement displ = 0 ;
399399 for (auto & i : attrs)
@@ -440,7 +440,7 @@ void ExprLambda::bindVars(EvalState & es, const std::shared_ptr<const StaticEnv>
440440 es.exprEnvs .insert (std::make_pair (this , env));
441441
442442 auto newEnv = std::make_shared<StaticEnv>(
443- nullptr , env. get () ,
443+ nullptr , env,
444444 (hasFormals () ? formals->formals .size () : 0 ) +
445445 (!arg ? 0 : 1 ));
446446
@@ -474,7 +474,7 @@ void ExprCall::bindVars(EvalState & es, const std::shared_ptr<const StaticEnv> &
474474void ExprLet::bindVars (EvalState & es, const std::shared_ptr<const StaticEnv> & env)
475475{
476476 auto newEnv = [&] () -> std::shared_ptr<const StaticEnv> {
477- auto newEnv = std::make_shared<StaticEnv>(nullptr , env. get () , attrs->attrs .size ());
477+ auto newEnv = std::make_shared<StaticEnv>(nullptr , env, attrs->attrs .size ());
478478
479479 Displacement displ = 0 ;
480480 for (auto & i : attrs->attrs )
@@ -500,7 +500,7 @@ void ExprWith::bindVars(EvalState & es, const std::shared_ptr<const StaticEnv> &
500500 es.exprEnvs .insert (std::make_pair (this , env));
501501
502502 parentWith = nullptr ;
503- for (auto * e = env.get (); e && !parentWith; e = e->up )
503+ for (auto * e = env.get (); e && !parentWith; e = e->up . get () )
504504 parentWith = e->isWith ;
505505
506506 /* Does this `with' have an enclosing `with'? If so, record its
@@ -509,14 +509,14 @@ void ExprWith::bindVars(EvalState & es, const std::shared_ptr<const StaticEnv> &
509509 const StaticEnv * curEnv;
510510 Level level;
511511 prevWith = 0 ;
512- for (curEnv = env.get (), level = 1 ; curEnv; curEnv = curEnv->up , level++)
512+ for (curEnv = env.get (), level = 1 ; curEnv; curEnv = curEnv->up . get () , level++)
513513 if (curEnv->isWith ) {
514514 prevWith = level;
515515 break ;
516516 }
517517
518518 attrs->bindVars (es, env);
519- auto newEnv = std::make_shared<StaticEnv>(this , env. get () );
519+ auto newEnv = std::make_shared<StaticEnv>(this , env);
520520 body->bindVars (es, newEnv);
521521}
522522
0 commit comments