about summary refs log tree commit diff
path: root/tvix/eval/src/vm/generators.rs
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-12-13T05·18-0800
committertazjin <tazjin@tvl.su>2023-12-29T21·34+0000
commit7ddea7340f547166a3c3f7fdd0afa776d9ba35aa (patch)
treee5a2026ccdc1bc0c53ad3cc30818f131ce5cb4a0 /tvix/eval/src/vm/generators.rs
parent2af8174e2e36d4c96f612e92b3e00c3330fb56fa (diff)
fix(tvix/eval): catchable in type field of nix_eq() r/7274
Change-Id: I165ff77764e272cc94d18cb03ad6cbc9a8ebefde
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10348
Autosubmit: Adam Joseph <adam@westernsemico.com>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/vm/generators.rs')
-rw-r--r--tvix/eval/src/vm/generators.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/tvix/eval/src/vm/generators.rs b/tvix/eval/src/vm/generators.rs
index 9686e6542f13..716aaf96b498 100644
--- a/tvix/eval/src/vm/generators.rs
+++ b/tvix/eval/src/vm/generators.rs
@@ -631,12 +631,13 @@ pub(crate) async fn check_equality(
     a: Value,
     b: Value,
     ptr_eq: PointerEquality,
-) -> Result<bool, ErrorKind> {
+) -> Result<Result<bool, CatchableErrorKind>, ErrorKind> {
     match co
         .yield_(VMRequest::NixEquality(Box::new((a, b)), ptr_eq))
         .await
     {
-        VMResponse::Value(value) => value.as_bool(),
+        VMResponse::Value(Value::Bool(b)) => Ok(Ok(b)),
+        VMResponse::Value(Value::Catchable(cek)) => Ok(Err(cek)),
         msg => panic!(
             "Tvix bug: VM responded with incorrect generator message: {}",
             msg