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 <adam@westernsemico.com> Reviewed-on: https://cl.tvl.fyi/c/depot/+/7091 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
This commit is contained in:
		
							parent
							
								
									c096152953
								
							
						
					
					
						commit
						1cccf002bc
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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()
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue