ref: d3ed26c37dedef85e3b193724facde2ee24acb64
parent: abf3f3998139d3bc5bddc6fb90c63aecbcb48165
author: Ori Bernstein <[email protected]>
date: Mon Feb 17 17:50:53 EST 2014
Add buggered test for trait implementation. We should get this working at some point.
--- a/test/tests
+++ b/test/tests
@@ -73,6 +73,7 @@
B genericval E 42
B trait-builtin E 42
B emptytrait E 123
+# B traitimpl E 24 ##BUGGERED
B nestucon P asdf
B mkunion E 0
B genericcall E 42
--- /dev/null
+++ b/test/trait.myr
@@ -1,0 +1,20 @@
+use std
+
+trait frobable @a =
+ frob : (val : @a -> @a)
+;;
+
+impl frobable int =
+ frob = {val
+ -> val * 2
+ }
+;;
+
+generic foo = {x : @a::frobable
+ -> frob(x)
+}
+
+const main = {
+ std.exit(foo(12))
+}
+