From 1cccf002bc7c86e97fa20031347485715d38c00d Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 25 Oct 2022 02:35:08 -0700 Subject: fix(tvix/eval): Scope.inherit(): fix scope_depth, with_stack_depth Scope_depth and with_stack_depth were being reset to zero for nested function abstractions. Fortunately nothing depends on them being computed correctly in these cases, but it sure was confusing. Change-Id: I59980b6a5aff043f60079f97211220b0086eb97d Signed-off-by: Adam Joseph Reviewed-on: https://cl.tvl.fyi/c/depot/+/7091 Reviewed-by: tazjin Tested-by: BuildkiteCI --- tvix/eval/src/compiler/scope.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tvix/eval') diff --git a/tvix/eval/src/compiler/scope.rs b/tvix/eval/src/compiler/scope.rs index 3b75bdbc42fe..d3c9f8300780 100644 --- a/tvix/eval/src/compiler/scope.rs +++ b/tvix/eval/src/compiler/scope.rs @@ -171,6 +171,8 @@ impl Scope { pub fn inherit(&self) -> Self { Self { poisoned_tokens: self.poisoned_tokens.clone(), + scope_depth: self.scope_depth + 1, + with_stack_size: self.with_stack_size + 1, ..Default::default() } } -- cgit 1.4.1