Hello everyone, I’m having this error after upgrading to 4.0.0-rc.5
. This used to work on my previous 4.0.0-rc.3
. Does anyone have a hint on what can I do instead? Or is it a bug on Haxe?
The error happens on this call: Std.is(obj, Map)
. You can see what I’m doing in the full function below. Any help is appreciated! Cheers!
private static function objectKeys (obj: Dynamic): Array<Dynamic> {
if (Std.is(obj, Array)) {
var keys = new Array();
var length: Int = ((cast (obj, Array<Dynamic>)).length);
for (i in 0...length) {
keys.push(i);
}
return keys;
}
if (Std.is(obj, Map)) { // Error: "Cannot use abstract as value"
return obj.keys();
}
return Reflect.fields(obj);
};