summaryrefslogtreecommitdiff
path: root/tiger-compiler/tests/good/shadowing-functions.tig
diff options
context:
space:
mode:
Diffstat (limited to 'tiger-compiler/tests/good/shadowing-functions.tig')
-rw-r--r--tiger-compiler/tests/good/shadowing-functions.tig11
1 files changed, 11 insertions, 0 deletions
diff --git a/tiger-compiler/tests/good/shadowing-functions.tig b/tiger-compiler/tests/good/shadowing-functions.tig
new file mode 100644
index 0000000..d3eeeac
--- /dev/null
+++ b/tiger-compiler/tests/good/shadowing-functions.tig
@@ -0,0 +1,11 @@
+/* This is legal. The second function "g" simply hides the first one.
+ Because of the intervening variable declaration, the two "g" functions
+ are not in the same batch of mutually recursive functions.
+ See also test39 */
+let
+ function g(a : int) : int = a
+ type t = int
+ function g(a : int) : int = a
+in
+ 0
+end