If you check whether a class or enum is a Class or Enum using Std.isOfType, both return true.
For example:
package;
class Main
{
static function main():Void
{
trace(Std.isOfType(Example, Class), Std.isOfType(Example, Enum));
}
}
class Example
{
public var message:String;
public function new(message:String) this.message = message;
public function toString() return this.message;
}
Example is clearly not an enum, yet the output is true,true.
This only happens on the C++ target. I tried Eval, Neko, PHP, and JavaScript, but this doesn't happen on any of those targets.
Is there a workaround I can use?
If you check whether a class or enum is a
ClassorEnumusingStd.isOfType, both returntrue.For example:
Exampleis clearly not an enum, yet the output istrue,true.This only happens on the C++ target. I tried Eval, Neko, PHP, and JavaScript, but this doesn't happen on any of those targets.
Is there a workaround I can use?