about summary refs log tree commit diff
path: root/src/libexpr/eval-inline.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/eval-inline.hh')
-rw-r--r--src/libexpr/eval-inline.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libexpr/eval-inline.hh b/src/libexpr/eval-inline.hh
index c34e24d3da39..c275f7ba83e8 100644
--- a/src/libexpr/eval-inline.hh
+++ b/src/libexpr/eval-inline.hh
@@ -55,6 +55,14 @@ inline void EvalState::forceAttrs(Value & v)
 }
 
 
+inline void EvalState::forceAttrs(Value & v, const Pos & pos)
+{
+    forceValue(v);
+    if (v.type != tAttrs)
+        throwTypeError("value is %1% while a set was expected, at %2%", v, pos);
+}
+
+
 inline void EvalState::forceList(Value & v)
 {
     forceValue(v);