Template functions (instantiated implicitly) work!

This commit is contained in:
Nathan Braswell
2018-10-09 23:00:57 -04:00
parent 39ecf24e69
commit 379d9f612e
6 changed files with 91 additions and 47 deletions

View File

@@ -58,6 +58,9 @@ obj binding<T> (Object) {
if ( ((bindings->get(i)) cast *binding<T>)->bound_to == from)
((bindings->get(i)) cast *binding<T>)->bound_to = to
}
fun set_single(to: *T) {
bound_to = to
}
fun to_string(): str {
/*return "binding(" + to_string(bound_to) + ")"*/
return "binding(" + deref_to_string(bound_to) + ")"