This commit is contained in:
Ben Burdette 2021-04-28 09:55:08 -06:00
parent b466d51952
commit 57c2dd5d85
2 changed files with 3 additions and 3 deletions

View file

@ -1278,7 +1278,7 @@ void EvalState::callFunction(Value & fun, Value & arg, Value & v, const Pos & po
if (!fun.isLambda()) { if (!fun.isLambda()) {
auto error = TypeError({ auto error = TypeError({
// .hint = hintfmt("attempt to call something which is not a function but %1%", showType(fun)), // .hint = hintfmt("attempt to call something which is not a function but %1%", showType(fun)),
.hint = hintfmt("attempt to call something which is not a function but %1%", fun), .msg = hintfmt("attempt to call something which is not a function but %1%", fun),
.errPos = pos .errPos = pos
}); });
if (debuggerHook) if (debuggerHook)

View file

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