diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-12T11·31+0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-12T11·34+0100 |
commit | 2bcb384e95500ff197fd4888c659ccf0034cf214 (patch) | |
tree | 8b6f37dfd938481fb22cc256080a6e050cbd6da9 | |
parent | c897bac54954373f63511702731fe2cb23c0c98e (diff) |
Add a test to check that tail calls run in bounded stack space
-rw-r--r-- | tests/lang/eval-okay-tail-call-1.exp | 1 | ||||
-rw-r--r-- | tests/lang/eval-okay-tail-call-1.nix | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-tail-call-1.exp b/tests/lang/eval-okay-tail-call-1.exp new file mode 100644 index 000000000000..f7393e847d34 --- /dev/null +++ b/tests/lang/eval-okay-tail-call-1.exp @@ -0,0 +1 @@ +100000 diff --git a/tests/lang/eval-okay-tail-call-1.nix b/tests/lang/eval-okay-tail-call-1.nix new file mode 100644 index 000000000000..a3962ce3fdb5 --- /dev/null +++ b/tests/lang/eval-okay-tail-call-1.nix @@ -0,0 +1,3 @@ +let + f = n: if n == 100000 then n else f (n + 1); +in f 0 |