about summary refs log tree commit diff
path: root/tvix/eval/src/tests/tvix_tests/eval-okay-deferred-with.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-09-06T20·20+0300
committertazjin <tazjin@tvl.su>2022-09-11T12·26+0000
commit627dfabef1dd3b640d07777de5535d074fb12f19 (patch)
tree6303bd5648ee3e9821ce00b2d8d839b5690f8cc1 /tvix/eval/src/tests/tvix_tests/eval-okay-deferred-with.nix
parent07ea30370e887b16228af0dccbe126010cce9e25 (diff)
fix(tvix/eval): thunk all uses of `with` r/4802
With this all other "weird scope" logic starts working for `with` as
well.

Change-Id: I0ea1d8c5fbd9cec5084bd574224f77b71ff2b487
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6487
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-deferred-with.nix')
-rw-r--r--tvix/eval/src/tests/tvix_tests/eval-okay-deferred-with.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-deferred-with.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-deferred-with.nix
new file mode 100644
index 000000000000..af227ae28e87
--- /dev/null
+++ b/tvix/eval/src/tests/tvix_tests/eval-okay-deferred-with.nix
@@ -0,0 +1,8 @@
+# Tests using `with` on a set that does not yet exist on the stack.
+
+let
+  result = with set; value;
+  set = {
+    value = 42;
+  };
+in result