Merge "libexpr: associate let exprs with the correct StaticEnv" into main
This commit is contained in:
commit
0f518f44e2
4 changed files with 21 additions and 1 deletions
|
@ -483,7 +483,7 @@ void ExprLet::bindVars(EvalState & es, const std::shared_ptr<const StaticEnv> &
|
|||
i.second.e->bindVars(es, i.second.chooseByKind(newEnv, env, inheritFromEnv));
|
||||
|
||||
if (es.debugRepl)
|
||||
es.exprEnvs.insert(std::make_pair(this, newEnv));
|
||||
es.exprEnvs.insert(std::make_pair(this, env));
|
||||
|
||||
body->bindVars(es, newEnv);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
with { inherit ({}) invalid; };
|
||||
let
|
||||
x = builtins.break 1;
|
||||
in
|
||||
x
|
|
@ -0,0 +1,14 @@
|
|||
info: breakpoint reached
|
||||
|
||||
debugger should not crash now, but also not show any with variables
|
||||
nix-repl> :st
|
||||
0: error: breakpoint reached
|
||||
«none»:0
|
||||
Env level 0
|
||||
static: x
|
||||
|
||||
Env level 1
|
||||
static:
|
||||
|
||||
Env level 2
|
||||
abort baseNameOf break builtins derivation derivationStrict dirOf false fetchGit fetchMercurial fetchTarball fetchTree fromTOML import isNull map null placeholder removeAttrs scopedImport throw toString true
|
|
@ -124,6 +124,7 @@ TEST_F(ReplSessionTest, repl_basic)
|
|||
|
||||
DEBUGGER_TEST(regression_9918);
|
||||
DEBUGGER_TEST(regression_9917);
|
||||
DEBUGGER_TEST(regression_l145);
|
||||
DEBUGGER_TEST(stack_vars);
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue