This commit is contained in:
Ben Burdette 2021-11-09 13:14:49 -07:00
parent 885f819922
commit 7e2a3db4eb
3 changed files with 7 additions and 15 deletions

View file

@ -78,8 +78,6 @@ void printValue(std::ostream & str, std::set<const Value *> & active, const Valu
return;
}
str << "internal type: " << v.internalType << std::endl;
switch (v.internalType) {
case tInt:
str << v.integer;
@ -1737,8 +1735,6 @@ void ExprConcatStrings::eval(EvalState & state, Env & env, Value & v)
nf = n;
nf += vTmp.fpoint;
} else {
std::cerr << "envtype: " << showType(env.values[0]->type()) << std::endl;
throwEvalError(pos, "cannot add %1% to an integer", showType(vTmp), env, this);
}
} else if (firstType == nFloat) {
@ -1906,12 +1902,10 @@ string EvalState::forceStringNoCtx(Value & v, const Pos & pos)
if (v.string.context) {
if (pos)
throwEvalError(pos, "the string '%1%' is not allowed to refer to a store path (such as '%2%')",
v.string.s, v.string.context[0],
fakeEnv(1), 0);
v.string.s, v.string.context[0], fakeEnv(1), 0);
else
throwEvalError("the string '%1%' is not allowed to refer to a store path (such as '%2%')",
v.string.s, v.string.context[0],
fakeEnv(1), 0);
v.string.s, v.string.context[0], fakeEnv(1), 0);
}
return s;
}

View file

@ -208,7 +208,6 @@ public:
string forceString(Value & v, const Pos & pos = noPos);
string forceString(Value & v, PathSet & context, const Pos & pos = noPos);
string forceStringNoCtx(Value & v, const Pos & pos = noPos);
// string forceStringNoCtx(std::optional<Bindings*> b, Value & v, const Pos & pos = noPos);
/* Return true iff the value `v' denotes a derivation (i.e. a
set with attribute `type = "derivation"'). */

View file

@ -295,7 +295,6 @@ void ExprVar::bindVars(const std::shared_ptr<const StaticEnv> &env)
"undefined variable" error now. */
if (withLevel == -1)
{
// std::cout << " throw UndefinedVarError({" << std::endl;
throw UndefinedVarError({
.msg = hintfmt("undefined variable (ExprVar bindvars) '%1%'", name),
.errPos = pos