mirror of
https://github.com/NixOS/nix
synced 2025-06-26 15:51:15 +02:00
Merge remote-tracking branch 'origin/master' into flakes
This commit is contained in:
commit
ef4d3fc111
12 changed files with 416 additions and 65 deletions
|
@ -1551,7 +1551,7 @@ NixFloat EvalState::forceFloat(Value & v, const Pos & pos)
|
|||
|
||||
bool EvalState::forceBool(Value & v, const Pos & pos)
|
||||
{
|
||||
forceValue(v);
|
||||
forceValue(v, pos);
|
||||
if (v.type != tBool)
|
||||
throwTypeError("value is %1% while a Boolean was expected, at %2%", v, pos);
|
||||
return v.boolean;
|
||||
|
@ -1566,7 +1566,7 @@ bool EvalState::isFunctor(Value & fun)
|
|||
|
||||
void EvalState::forceFunction(Value & v, const Pos & pos)
|
||||
{
|
||||
forceValue(v);
|
||||
forceValue(v, pos);
|
||||
if (v.type != tLambda && v.type != tPrimOp && v.type != tPrimOpApp && !isFunctor(v))
|
||||
throwTypeError("value is %1% while a function was expected, at %2%", v, pos);
|
||||
}
|
||||
|
@ -1643,7 +1643,7 @@ std::optional<string> EvalState::tryAttrsToString(const Pos & pos, Value & v,
|
|||
string EvalState::coerceToString(const Pos & pos, Value & v, PathSet & context,
|
||||
bool coerceMore, bool copyToStore)
|
||||
{
|
||||
forceValue(v);
|
||||
forceValue(v, pos);
|
||||
|
||||
string s;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue