Under Review
over 1 year ago

6.2.0: Cannot call instance methods on objects from static functions defined on the same class

class Set {
function addAll(items as Array<Object?> or Set) as Void {
// Add all items to the set from a source array or set
...
}

...

static function from(items as Array<Object?> or Set) as Set {
/*
Initialize and return a new Set from a source array or set

:arg items: Array or Set to build new Set from
*/
var set = new Set();
set.addAll(items);
return set;
}
}
}

ERROR: fenix6pro: .../source/set.mc:215,12: Cannot find symbol ':addAll' on type '$.Sets.Set'.