feat(tvix/eval): implement inherit in let expressions
Note that at this point recursive bindings do not yet work in either attrsets or let, so inheriting from the same scope is generally not possible yet. Change-Id: I6ca820d04b8ded5c22fb7ea18e2ec203bcaa8e9c Reviewed-on: https://cl.tvl.fyi/c/depot/+/6215 Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
This commit is contained in:
		
							parent
							
								
									8c1c9aee3c
								
							
						
					
					
						commit
						f173161f4c
					
				
					 3 changed files with 49 additions and 14 deletions
				
			
		
							
								
								
									
										1
									
								
								tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit.exp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit.exp
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
1
 | 
			
		||||
							
								
								
									
										8
									
								
								tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
let
 | 
			
		||||
  set = {
 | 
			
		||||
    a = 1;
 | 
			
		||||
  };
 | 
			
		||||
in
 | 
			
		||||
  let
 | 
			
		||||
    inherit (set) a;
 | 
			
		||||
  in a
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue