class Test {
static var foo:Foo = null;
static function main() {
trace(switch (foo) {
case B: "B";
case A: "A";
default: "B";
});
// Outputs "A" only on hashlink, otherwise B
}
}
enum abstract Foo(Null<Int>) {
public var A = 0;
public var B = 1;
}
looks as though an int cast is converting null to 0, despite that null is a valid value for foo. We were able to work around this by adding case null: up top, but still seems like a bug
Example:
looks as though an int cast is converting null to 0, despite that null is a valid value for foo. We were able to work around this by adding
case null:
up top, but still seems like a bug