diff options
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-closure-self.exp | 1 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-closure-self.nix | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-closure-self.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-closure-self.exp new file mode 100644 index 000000000000..be54b4b4e39e --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-closure-self.exp @@ -0,0 +1 @@ +"done" diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-closure-self.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-closure-self.nix new file mode 100644 index 000000000000..bda364f42992 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-closure-self.nix @@ -0,0 +1,4 @@ +let + # self-recursive function should be able to close over itself + f = n: if n <= 0 then "done" else f (n - 1); +in f 10 |