Almost have scoped . working, in fact it is, but having objects with member names has problems (like o.o) if the member function is in scope. (it thinks maybe you're trying to call o on itself...)

This commit is contained in:
Nathan Braswell
2018-12-18 02:51:44 -05:00
parent eadadd5576
commit 66f82062ba
4 changed files with 109 additions and 47 deletions

View File

@@ -217,6 +217,10 @@ obj vec<T> (Object, Serializable) {
for (var i = 0; i < dataIn.size; i++;)
addEnd(dataIn[i]);
}
fun add_all_unique<U>(dataIn: ref vec<U>): void {
for (var i = 0; i < dataIn.size; i++;)
add_unique(dataIn[i]);
}
// same darn trick
fun add_unique<U>(dataIn: ref U): void {
if (!contains(dataIn))