about summary refs log tree commit diff
path: root/tvix/eval/src/tests/tvix_tests/eval-okay-fix.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-09-03T13·18+0300
committertazjin <tazjin@tvl.su>2022-09-08T20·17+0000
commitabdfa7459eb60f2b92064bdff12e33d04491e1cd (patch)
tree6b9e742d78906d16b91d8c72ff5a99ea3df0c5af /tvix/eval/src/tests/tvix_tests/eval-okay-fix.nix
parent9f379ef6dffba1178cba5155d1afb4c5d87110ff (diff)
feat(tvix/eval): thunk binary operations and select expressions r/4770
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
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-fix.nix')
-rw-r--r--tvix/eval/src/tests/tvix_tests/eval-okay-fix.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-fix.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-fix.nix
new file mode 100644
index 000000000000..27d2fae1042e
--- /dev/null
+++ b/tvix/eval/src/tests/tvix_tests/eval-okay-fix.nix
@@ -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;
+})