Fix a bunch of stuff back and forth, 39 tests passing

This commit is contained in:
Nathan Braswell
2016-02-25 14:24:55 -05:00
parent efebf8b1d7
commit 8ce464eb0a
6 changed files with 80 additions and 17 deletions

View File

@@ -69,6 +69,11 @@ obj set<T> (Object, Serializable) {
fun operator+=(items: ref set<T>) {
add(items)
}
fun operator+(items: ref set<T>): set<T> {
var to_ret.copy_construct(this): set<T>
to_ret.add(items)
return to_ret
}
fun add(item: ref T) {
if (!contains(item))
data.add(item)