revert value-add

This commit is contained in:
Ben Burdette 2022-01-05 14:25:45 -07:00
parent bf8a065be0
commit 84aeb74377

View file

@ -641,9 +641,9 @@ bool NixRepl::processLine(string line)
isVarName(name = removeWhitespace(string(line, 0, p))))
{
Expr * e = parseString(string(line, p + 1));
Value *v = new Value(*state->allocValue());
v->mkThunk(env, e);
addVarToScope(state->symbols.create(name), *v);
Value & v(*state->allocValue());
v.mkThunk(env, e);
addVarToScope(state->symbols.create(name), v);
} else {
Value v;
evalString(line, v);