ref: da52a8bf41174d1483c6094a339be759741df877
parent: 8535643bf09a88c6e83727ba0243772703171ca8
author: Ori Bernstein <[email protected]>
date: Tue May 20 18:14:54 EDT 2014
Add tests for impls over compound types. As expected -- it's broken.
--- /dev/null
+++ b/test/compoundimpl.myr
@@ -1,0 +1,29 @@
+use std
+
+trait frobable @a =
+ frob : (val : @a -> void)
+;;
+
+impl frobable int# =
+ frob = {val
+ std.put("intptr,")
+ }
+;;
+
+impl frobable char# =
+ frob = {val
+ std.put("charptr\n")
+ }
+;;
+
+generic foo = {x : @a::frobable
+ frob(x)
+}
+
+const main = {
+ var a = 123
+ var b = 'c'
+ foo(&a)
+ foo(&b)
+}
+
--- a/test/tests
+++ b/test/tests
@@ -75,6 +75,7 @@
B trait-builtin E 42
B emptytrait E 123
B traitimpl P 246,44
+# B compoundimpl P intptr,charptr BUGGERED
B nestucon P asdf
B mkunion E 0
B genericcall E 42