mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 07:16:17 +02:00
Add a test to check that tail calls run in bounded stack space
This commit is contained in:
parent
c897bac549
commit
2bcb384e95
2 changed files with 4 additions and 0 deletions
1
tests/lang/eval-okay-tail-call-1.exp
Normal file
1
tests/lang/eval-okay-tail-call-1.exp
Normal file
|
@ -0,0 +1 @@
|
|||
100000
|
3
tests/lang/eval-okay-tail-call-1.nix
Normal file
3
tests/lang/eval-okay-tail-call-1.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
let
|
||||
f = n: if n == 100000 then n else f (n + 1);
|
||||
in f 0
|
Loading…
Reference in a new issue