mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 12:06:01 +01:00
pass Pos to forceValue to improve infinite recursion error
This commit is contained in:
parent
2f9789c2e6
commit
b865b5b40c
3 changed files with 37 additions and 37 deletions
|
|
@ -57,7 +57,7 @@ inline void EvalState::forceAttrs(Value & v)
|
|||
|
||||
inline void EvalState::forceAttrs(Value & v, const Pos & pos)
|
||||
{
|
||||
forceValue(v);
|
||||
forceValue(v, pos);
|
||||
if (v.type != tAttrs)
|
||||
throwTypeError("value is %1% while a set was expected, at %2%", v, pos);
|
||||
}
|
||||
|
|
@ -73,7 +73,7 @@ inline void EvalState::forceList(Value & v)
|
|||
|
||||
inline void EvalState::forceList(Value & v, const Pos & pos)
|
||||
{
|
||||
forceValue(v);
|
||||
forceValue(v, pos);
|
||||
if (!v.isList())
|
||||
throwTypeError("value is %1% while a list was expected, at %2%", v, pos);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue