summaryrefslogtreecommitdiff
path: root/tests/caseMod.lac
diff options
context:
space:
mode:
Diffstat (limited to 'tests/caseMod.lac')
-rw-r--r--tests/caseMod.lac19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/caseMod.lac b/tests/caseMod.lac
new file mode 100644
index 00000000..2c6fbc80
--- /dev/null
+++ b/tests/caseMod.lac
@@ -0,0 +1,19 @@
+structure M = struct
+ datatype t = A | B
+end
+
+val f = fn x : M.t => case x of M.A => M.B | M.B => M.A
+
+datatype t = datatype M.t
+
+val g = fn x : t => case x of M.A => B | B => M.A
+
+structure N = struct
+ datatype t = C of t | D
+end
+
+val h = fn x : N.t => case x of N.C x => x | N.D => M.A
+
+datatype u = datatype N.t
+
+val i = fn x : u => case x of N.C x => x | D => M.A