diff options
Diffstat (limited to 'tvix/eval/src/value/mod.rs')
-rw-r--r-- | tvix/eval/src/value/mod.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tvix/eval/src/value/mod.rs b/tvix/eval/src/value/mod.rs index de59691f278f..e6a6052c21dd 100644 --- a/tvix/eval/src/value/mod.rs +++ b/tvix/eval/src/value/mod.rs @@ -288,8 +288,14 @@ impl Value { Ok(*lhs.value() == *rhs.value()) } - (Value::Thunk(lhs), rhs) => Ok(&*lhs.value() == rhs), - (lhs, Value::Thunk(rhs)) => Ok(lhs == &*rhs.value()), + (Value::Thunk(lhs), rhs) => { + lhs.force(vm)?; + Ok(&*lhs.value() == rhs) + } + (lhs, Value::Thunk(rhs)) => { + rhs.force(vm)?; + Ok(lhs == &*rhs.value()) + } // Everything else is either incomparable (e.g. internal // types) or false. |