From 9d0425acc0eef553cb0c3023908f7de4c1e2de82 Mon Sep 17 00:00:00 2001 From: sterni Date: Sat, 27 May 2023 21:20:14 +0200 Subject: fix(tvix/eval): thunk legacy let to match regular one 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 Autosubmit: sterni Tested-by: BuildkiteCI --- tvix/eval/src/compiler/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs index 53854c75ab..8d2e8d6b23 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"), -- cgit 1.4.1