diff options
author | Silvan Mosberger <contact@infinisil.com> | 2020-12-12 02:15:11 +0100 |
---|---|---|
committer | Silvan Mosberger <contact@infinisil.com> | 2020-12-12 03:31:50 +0100 |
commit | bf9890396731a2bbe4f04a49684dee463d818906 (patch) | |
tree | 171d646c0540828a294346e887c214ba44b5472c /src/libexpr/eval-inline.hh | |
parent | 22ead43a0b8f94f5a4fb64cff14bf6a2a35d671c (diff) |
Add ValueType checking functions for types that have the same NormalType
Diffstat (limited to 'src/libexpr/eval-inline.hh')
-rw-r--r-- | src/libexpr/eval-inline.hh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/eval-inline.hh b/src/libexpr/eval-inline.hh index 9b644d5cb..8c40c2565 100644 --- a/src/libexpr/eval-inline.hh +++ b/src/libexpr/eval-inline.hh @@ -32,7 +32,7 @@ LocalNoInlineNoReturn(void throwTypeError(const Pos & pos, const char * s, const void EvalState::forceValue(Value & v, const Pos & pos) { - if (v.type == tThunk) { + if (v.isThunk()) { Env * env = v.thunk.env; Expr * expr = v.thunk.expr; try { @@ -46,9 +46,9 @@ void EvalState::forceValue(Value & v, const Pos & pos) throw; } } - else if (v.type == tApp) + else if (v.isApp()) callFunction(*v.app.left, *v.app.right, v, noPos); - else if (v.type == tBlackhole) + else if (v.isBlackhole()) throwEvalError(pos, "infinite recursion encountered"); } |