feat(tvix/eval): thunk binary operations and select expressions
With this, most cases of `fix` in attribute sets will work correctly. A simple test exercising both has been added. Change-Id: I70fd431177bb6e48ecb33a87518b050c4c3d1c09 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6437 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
This commit is contained in:
parent
9f379ef6df
commit
abdfa7459e
3 changed files with 22 additions and 2 deletions
1
tvix/eval/src/tests/tvix_tests/eval-okay-fix.exp
Normal file
1
tvix/eval/src/tests/tvix_tests/eval-okay-fix.exp
Normal file
|
@ -0,0 +1 @@
|
|||
{ a = 1; b = 21; c = 42; }
|
7
tvix/eval/src/tests/tvix_tests/eval-okay-fix.nix
Normal file
7
tvix/eval/src/tests/tvix_tests/eval-okay-fix.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
let
|
||||
fix = f: let x = f x; in x;
|
||||
in fix(self: {
|
||||
a = 1;
|
||||
b = self.a + 20;
|
||||
c = self.b * 2;
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue