summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <orib@google.com>2012-06-22 11:07:34 -0400
committerOri Bernstein <orib@google.com>2012-06-22 11:07:34 -0400
commit696575dc066473f238eab48e0741d82a7ba7a60a (patch)
tree3bad12ca5b0f4976d03c1b8a8eb9d73e8120a7d2
parent361fe40c15b2303421fe7b7df59712426e187104 (diff)
downloadmc-696575dc066473f238eab48e0741d82a7ba7a60a.tar.gz
Enable 'generic' test.
-rw-r--r--test/generic.myr12
-rw-r--r--test/tests19
2 files changed, 14 insertions, 17 deletions
diff --git a/test/generic.myr b/test/generic.myr
index 3cae23e..4b7a73f 100644
--- a/test/generic.myr
+++ b/test/generic.myr
@@ -1,13 +1,9 @@
-generic max = {a:@a::tcnum, b::@a::tcnum
- if (a > b)
- -> a
- else
- -> b
- ;;
+generic id = {a:@a
+ -> a
}
const main = {
- max('a', 'b')
- -> max(1, 2)
+ id("adsf")
+ -> id(42)
}
diff --git a/test/tests b/test/tests
index f764223..1ac047f 100644
--- a/test/tests
+++ b/test/tests
@@ -15,13 +15,13 @@
# evident.
B main E 0
B add E 53
-B mul E 42
-B div E 42
-B mod E 6
-B bsr E 5
+B mul E 42
+B div E 42
+B mod E 6
+B bsr E 5
B struct1 E 12
B struct E 42
-B structasn E 42
+B structasn E 42
B structret E 42
B array E 7
B arraylen E 12
@@ -32,10 +32,11 @@ B voidcall E 12
B callbig E 42
B loop E 45
B fib E 21
-B float E 1
-B log-and E 0
-B log-or E 1
-B str E 102
+B float E 1
+B log-and E 0
+B log-or E 1
+B str E 102
+B generic E 102
F declmismatch
F infermismatch
F flow