mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-28 00:26:15 +02:00
cleanup
This commit is contained in:
parent
885f819922
commit
7e2a3db4eb
3 changed files with 7 additions and 15 deletions
|
@ -78,8 +78,6 @@ void printValue(std::ostream & str, std::set<const Value *> & active, const Valu
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
str << "internal type: " << v.internalType << std::endl;
|
|
||||||
|
|
||||||
switch (v.internalType) {
|
switch (v.internalType) {
|
||||||
case tInt:
|
case tInt:
|
||||||
str << v.integer;
|
str << v.integer;
|
||||||
|
@ -1737,8 +1735,6 @@ void ExprConcatStrings::eval(EvalState & state, Env & env, Value & v)
|
||||||
nf = n;
|
nf = n;
|
||||||
nf += vTmp.fpoint;
|
nf += vTmp.fpoint;
|
||||||
} else {
|
} else {
|
||||||
std::cerr << "envtype: " << showType(env.values[0]->type()) << std::endl;
|
|
||||||
|
|
||||||
throwEvalError(pos, "cannot add %1% to an integer", showType(vTmp), env, this);
|
throwEvalError(pos, "cannot add %1% to an integer", showType(vTmp), env, this);
|
||||||
}
|
}
|
||||||
} else if (firstType == nFloat) {
|
} else if (firstType == nFloat) {
|
||||||
|
@ -1906,12 +1902,10 @@ string EvalState::forceStringNoCtx(Value & v, const Pos & pos)
|
||||||
if (v.string.context) {
|
if (v.string.context) {
|
||||||
if (pos)
|
if (pos)
|
||||||
throwEvalError(pos, "the string '%1%' is not allowed to refer to a store path (such as '%2%')",
|
throwEvalError(pos, "the string '%1%' is not allowed to refer to a store path (such as '%2%')",
|
||||||
v.string.s, v.string.context[0],
|
v.string.s, v.string.context[0], fakeEnv(1), 0);
|
||||||
fakeEnv(1), 0);
|
|
||||||
else
|
else
|
||||||
throwEvalError("the string '%1%' is not allowed to refer to a store path (such as '%2%')",
|
throwEvalError("the string '%1%' is not allowed to refer to a store path (such as '%2%')",
|
||||||
v.string.s, v.string.context[0],
|
v.string.s, v.string.context[0], fakeEnv(1), 0);
|
||||||
fakeEnv(1), 0);
|
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,7 +208,6 @@ public:
|
||||||
string forceString(Value & v, const Pos & pos = noPos);
|
string forceString(Value & v, const Pos & pos = noPos);
|
||||||
string forceString(Value & v, PathSet & context, const Pos & pos = noPos);
|
string forceString(Value & v, PathSet & context, const Pos & pos = noPos);
|
||||||
string forceStringNoCtx(Value & v, 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
|
/* Return true iff the value `v' denotes a derivation (i.e. a
|
||||||
set with attribute `type = "derivation"'). */
|
set with attribute `type = "derivation"'). */
|
||||||
|
|
|
@ -295,7 +295,6 @@ void ExprVar::bindVars(const std::shared_ptr<const StaticEnv> &env)
|
||||||
"undefined variable" error now. */
|
"undefined variable" error now. */
|
||||||
if (withLevel == -1)
|
if (withLevel == -1)
|
||||||
{
|
{
|
||||||
// std::cout << " throw UndefinedVarError({" << std::endl;
|
|
||||||
throw UndefinedVarError({
|
throw UndefinedVarError({
|
||||||
.msg = hintfmt("undefined variable (ExprVar bindvars) '%1%'", name),
|
.msg = hintfmt("undefined variable (ExprVar bindvars) '%1%'", name),
|
||||||
.errPos = pos
|
.errPos = pos
|
||||||
|
|
Loading…
Reference in a new issue