If you export an enum, you get this message:
./src/javascript/jsc/bindings/exports.zig:721:22: error: exported enum value must be declared extern
@export(ErrorCode.ParserErrorCode, .{ .name = "Zig_ErrorCodeParserError" });
^
If you follow the suggestion in the above error, you get an error that enums cannot be extern
/Users/jarred/Code/esdev/src/javascript/jsc/bindings/exports.zig:110:23: error: enums do not support 'packed' or 'extern'; instead provide an explicit integer tag type
pub const ErrorCode = extern enum(ErrorCodeInt) {
^
This feels like a bug, maybe in AST check or maybe in @export.
For now, I can work around this with an @enumToInt:
pub const ParserErrorCode = @enumToInt(ErrorCode.from(error.ParserError));
If you export an enum, you get this message:
If you follow the suggestion in the above error, you get an error that enums cannot be
externThis feels like a bug, maybe in AST check or maybe in
@export.For now, I can work around this with an
@enumToInt: