From 372bf4a0b74b4fc1f748bbcf5e5474457fef2f1c Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 29 Aug 2022 18:49:32 +0300 Subject: test(tvix/eval): test very simple late-bound identifier access This is the simplest kind of thunk that can be created (and so far the only one the compiler knows how to create), in which an identifier inside a `let` encounters a value that is bound *after* it is initialised. Change-Id: I6ea4408a3baef1e7d5137365d70804283f2dbf8e Reviewed-on: https://cl.tvl.fyi/c/depot/+/6354 Tested-by: BuildkiteCI Reviewed-by: sterni --- tvix/eval/src/tests/tvix_tests/eval-okay-late-binding.exp | 1 + tvix/eval/src/tests/tvix_tests/eval-okay-late-binding.nix | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-late-binding.exp create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-late-binding.nix (limited to 'tvix/eval/src/tests/tvix_tests') diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-late-binding.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-late-binding.exp new file mode 100644 index 000000000000..d81cc0710eb6 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-late-binding.exp @@ -0,0 +1 @@ +42 diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-late-binding.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-late-binding.nix new file mode 100644 index 000000000000..41c4c53ea271 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-late-binding.nix @@ -0,0 +1,4 @@ +let + a = b; + b = 42; +in a -- cgit 1.4.1