From 2bcb384e95500ff197fd4888c659ccf0034cf214 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Tue, 12 Nov 2013 11:31:50 +0000
Subject: [PATCH] Add a test to check that tail calls run in bounded stack
 space

---
 tests/lang/eval-okay-tail-call-1.exp | 1 +
 tests/lang/eval-okay-tail-call-1.nix | 3 +++
 2 files changed, 4 insertions(+)
 create mode 100644 tests/lang/eval-okay-tail-call-1.exp
 create mode 100644 tests/lang/eval-okay-tail-call-1.nix

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 000000000..f7393e847
--- /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 000000000..a3962ce3f
--- /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
-- 
GitLab