about summary refs log tree commit diff
path: root/tvix/eval/src/compiler/mod.rs
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2023-05-27T19·20+0200
committerclbot <clbot@tvl.fyi>2023-05-29T12·44+0000
commit9d0425acc0eef553cb0c3023908f7de4c1e2de82 (patch)
treeb05ed6bf80a2fb8ccba070b9a644e9cab4049587 /tvix/eval/src/compiler/mod.rs
parent385c7978841af20da9bd47a829dd1f2d3f6cdd2e (diff)
fix(tvix/eval): thunk legacy let to match regular one r/6215
Probably no real world code broken by this overzealous evaluation, but
let's be thorough!

Change-Id: Ib405a677182eab7940ace940c68e107573473a54
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8655
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/compiler/mod.rs')
-rw-r--r--tvix/eval/src/compiler/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index 53854c75ab31..8d2e8d6b23fb 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -295,7 +295,9 @@ impl Compiler<'_> {
             // their value on the stack.
             ast::Expr::Paren(paren) => self.compile(slot, paren.expr().unwrap()),
 
-            ast::Expr::LegacyLet(legacy_let) => self.compile_legacy_let(slot, legacy_let),
+            ast::Expr::LegacyLet(legacy_let) => self.thunk(slot, legacy_let, move |c, s| {
+                c.compile_legacy_let(s, legacy_let)
+            }),
 
             ast::Expr::Root(_) => unreachable!("there cannot be more than one root"),
             ast::Expr::Error(_) => unreachable!("compile is only called on validated trees"),