From 7ddef73d026d79adc0c4f3fd1518d88d1331c38c Mon Sep 17 00:00:00 2001 From: Ben Burdette Date: Thu, 19 May 2022 12:44:40 -0600 Subject: de-const evalState exceptions --- src/libcmd/command.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/libcmd/command.cc') diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc index 9cf2ff5e3..a7d7bfb17 100644 --- a/src/libcmd/command.cc +++ b/src/libcmd/command.cc @@ -118,9 +118,10 @@ ref EvalCommand::getEvalState() searchPath, getEvalStore(), getStore()) #endif ; + // TODO move this somewhere else. Its only here to get the evalState ptr! if (startReplOnEvalErrors) // debuggerHook = [evalState{ref(evalState)}](const Error * error, const Env & env, const Expr & expr) { - debuggerHook = [](const EvalState & evalState, const Error * error, const Env & env, const Expr & expr) { + debuggerHook = [](EvalState & evalState, const Error * error, const Env & env, const Expr & expr) { auto dts = error && expr.getPos() ? std::make_unique( @@ -137,9 +138,9 @@ ref EvalCommand::getEvalState() if (error) printError("%s\n\n" ANSI_BOLD "Starting REPL to allow you to inspect the current state of the evaluator.\n" ANSI_NORMAL, error->what()); - auto se = evalState->getStaticEnv(expr); + auto se = evalState.getStaticEnv(expr); if (se) { - auto vm = mapStaticEnvBindings(evalState->symbols, *se.get(), env); + auto vm = mapStaticEnvBindings(evalState.symbols, *se.get(), env); runRepl(evalState, *vm); } }; -- cgit v1.2.3