diff options
author | Vincent Ambo <mail@tazj.in> | 2022-09-03T01·25+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-09-08T20·17+0000 |
commit | 678533bfc487dddfc4a2ad87b307159af952a225 (patch) | |
tree | 8772f7b4ce7edc79182ac2031ad0de1194d9c239 /tvix/eval/src/tests/tvix_tests/eval-okay-nested-let-slots.nix | |
parent | 09eaa0d4ae63b0513c934535a40fa2aaa25846e1 (diff) |
test(tvix/eval): add test for stack slot accounting edge-case r/4764
This was fixed by some of the previous commits around scopes. It's somewhat similar to a few other tests, but I had this one failing earlier and everything else succeeding, so it is useful to keep it around for sure. Change-Id: Ie6cf372b5c805daf992cd87aeb3dfe91542c381c Reviewed-on: https://cl.tvl.fyi/c/depot/+/6431 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-nested-let-slots.nix')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-nested-let-slots.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-nested-let-slots.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-let-slots.nix new file mode 100644 index 000000000000..811bb4361bf7 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-let-slots.nix @@ -0,0 +1,17 @@ +# This test deals with a tricky edge-case around scopes, where the +# stack slot accounting must correctly account for the position at +# which the body of a let expression is being initialised when +# resolving upvalues. + +let + a = 1; + b = 2; + outer = let + c = 3; + d = 4; + inner = let + e = 5; + f = 6; + in g: [ a b c d e f g ]; + in inner; +in outer 7 |