pass Pos to forceValue to improve infinite recursion error

This commit is contained in:
Domen Kožar
2020-04-16 12:32:07 +02:00
parent 2f9789c2e6
commit b865b5b40c
3 changed files with 37 additions and 37 deletions
+2 -2
View File
@@ -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);
}