summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/infer-named.myr21
-rw-r--r--test/tests1
2 files changed, 22 insertions, 0 deletions
diff --git a/test/infer-named.myr b/test/infer-named.myr
new file mode 100644
index 0000000..002cc97
--- /dev/null
+++ b/test/infer-named.myr
@@ -0,0 +1,21 @@
+use std
+
+type u = union
+ `Foo
+ `Bar int
+;;
+
+const f = {v : int -> u
+ -> `Bar v
+}
+
+const main = {
+ var v
+
+ v = f(99)
+ match v
+ `Foo: -> 1;;
+ `Bar x: -> x;;
+ ;;
+ -> 2
+}
diff --git a/test/tests b/test/tests
index bc50801..6171a95 100644
--- a/test/tests
+++ b/test/tests
@@ -76,6 +76,7 @@ B arraylit-ni E 2
B tuple E 42
B slgrow E 42
B tyrec E 42
+B infer-named E 99
B helloworld P Hello-世界
B catfile P Hello-世界
B encodechar P 1世界äa