summaryrefslogtreecommitdiff
path: root/tiger-compiler/tests/bind/test19.tig
diff options
context:
space:
mode:
Diffstat (limited to 'tiger-compiler/tests/bind/test19.tig')
-rw-r--r--tiger-compiler/tests/bind/test19.tig13
1 files changed, 13 insertions, 0 deletions
diff --git a/tiger-compiler/tests/bind/test19.tig b/tiger-compiler/tests/bind/test19.tig
new file mode 100644
index 0000000..662ed35
--- /dev/null
+++ b/tiger-compiler/tests/bind/test19.tig
@@ -0,0 +1,13 @@
+/* error : second function uses variables local to the first one, undeclared variable */
+let
+
+function do_nothing1(a : int, b : string) : int=
+ (do_nothing2 (a+1);0)
+
+function do_nothing2(d : int) : string =
+ (do_nothing1 (a, "str");" ")
+
+in
+ do_nothing1(0, "str2")
+end
+