From 57c2dd5d8581f37392df369493b00794b619304e Mon Sep 17 00:00:00 2001 From: Ben Burdette Date: Wed, 28 Apr 2021 09:55:08 -0600 Subject: [PATCH] fixes --- src/libexpr/eval.cc | 2 +- src/nix/repl.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index a92adc3c0..37fb6ed18 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -1278,7 +1278,7 @@ void EvalState::callFunction(Value & fun, Value & arg, Value & v, const Pos & po if (!fun.isLambda()) { 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%", fun), + .msg = hintfmt("attempt to call something which is not a function but %1%", fun), .errPos = pos }); if (debuggerHook) diff --git a/src/nix/repl.cc b/src/nix/repl.cc index bb067e935..b1f250e73 100644 --- a/src/nix/repl.cc +++ b/src/nix/repl.cc @@ -537,8 +537,8 @@ bool NixRepl::processLine(string line) isVarName(name = removeWhitespace(string(line, 0, p)))) { Expr * e = parseString(string(line, p + 1)); - Value & v(*state->allocValue()); - v.mkThunk(env, e); + Value *v = new Value(*state->allocValue()); + v->mkThunk(env, e); addVarToScope(state->symbols.create(name), v); } else { Value v;