diff options
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-deeply-nested-with-closure.exp | 1 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-deeply-nested-with-closure.nix | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-deeply-nested-with-closure.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-deeply-nested-with-closure.exp new file mode 100644 index 000000000000..3bed31f76e3f --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-deeply-nested-with-closure.exp @@ -0,0 +1 @@ +[ 1 2 3 4 ] diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-deeply-nested-with-closure.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-deeply-nested-with-closure.nix new file mode 100644 index 000000000000..7f13f1f27030 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-deeply-nested-with-closure.nix @@ -0,0 +1,18 @@ +# This convoluted test constructs a situation in which dynamically +# resolved upvalues refer `with` blocks introduced at different lambda +# context boundaries, i.e. the access to a, b in the innermost closure +# must be threaded through upvalues in several levels. + +(_: +with { a = 1; b = 1; }; + +_: +with { b = 2; c = 2; }; + +_: +with { c = 3; d = 3; }; + +_: +with { d = 4; }; + +[ a b c d ]) null null null null |