summaryrefslogtreecommitdiff
path: root/test/generic.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2012-06-19 23:31:43 -0400
committerOri Bernstein <ori@eigenstate.org>2012-06-19 23:31:43 -0400
commit3535b00498a9812b689a8fee281b73d426b92aff (patch)
tree79783afea128822ff14e1c2f3a1d91e8a25fb914 /test/generic.myr
parent73158c2bad4d1ce6817abecf22e625039ccb1510 (diff)
downloadmc-3535b00498a9812b689a8fee281b73d426b92aff.tar.gz
Add test for generics.
Diffstat (limited to 'test/generic.myr')
-rw-r--r--test/generic.myr13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/generic.myr b/test/generic.myr
new file mode 100644
index 0000000..3cae23e
--- /dev/null
+++ b/test/generic.myr
@@ -0,0 +1,13 @@
+generic max = {a:@a::tcnum, b::@a::tcnum
+ if (a > b)
+ -> a
+ else
+ -> b
+ ;;
+}
+
+const main = {
+ max('a', 'b')
+ -> max(1, 2)
+}
+