fix(tvix/eval): thunk let-expression

There are some rare scope cases with deferred access where this
doesn't behave correctly otherwise.

Change-Id: I6c774f5e62c1cb50b598026c54727017a52cd22d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7064
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2022-10-22 19:59:06 +03:00 committed by tazjin
parent 5b305fab40
commit 5612ec0f41

View file

@ -224,7 +224,11 @@ impl Compiler<'_> {
ast::Expr::IfElse(if_else) => {
self.thunk(slot, if_else, move |c, s| c.compile_if_else(s, if_else))
}
ast::Expr::LetIn(let_in) => self.compile_let_in(slot, let_in),
ast::Expr::LetIn(let_in) => {
self.thunk(slot, let_in, move |c, s| c.compile_let_in(s, let_in))
}
ast::Expr::Ident(ident) => self.compile_ident(slot, ident),
ast::Expr::With(with) => self.thunk(slot, with, |c, s| c.compile_with(s, with)),
ast::Expr::Lambda(lambda) => {