mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 22:46:16 +02:00
formatting; string arg for throwTypeError
This commit is contained in:
parent
ebf530d31e
commit
93ca9381da
1 changed files with 8 additions and 6 deletions
|
@ -743,11 +743,11 @@ LocalNoInlineNoReturn(void throwTypeError(const Pos & pos, const char * s, const
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalNoInlineNoReturn(void throwTypeError(const Pos & pos, const char * s, const char * t, valmap * env))
|
LocalNoInlineNoReturn(void throwTypeError(const Pos & pos, const char * s, const string &s2, valmap * env))
|
||||||
{
|
{
|
||||||
auto delenv = std::unique_ptr<valmap>(env);
|
auto delenv = std::unique_ptr<valmap>(env);
|
||||||
auto error = TypeError({
|
auto error = TypeError({
|
||||||
.msg = hintfmt(s, t),
|
.msg = hintfmt(s, s2),
|
||||||
.errPos = pos
|
.errPos = pos
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -2077,7 +2077,9 @@ bool EvalState::eqValues(Value & v1, Value & v2)
|
||||||
return v1.fpoint == v2.fpoint;
|
return v1.fpoint == v2.fpoint;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throwEvalError("cannot compare %1% with %2%", showType(v1), showType(v2),
|
throwEvalError("cannot compare %1% with %2%",
|
||||||
|
showType(v1),
|
||||||
|
showType(v2),
|
||||||
map2("value1", &v1, "value2", &v2));
|
map2("value1", &v1, "value2", &v2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue