diff --git a/src/compiler/parse_expr.c b/src/compiler/parse_expr.c index 06e38db3b..170dd0b89 100644 --- a/src/compiler/parse_expr.c +++ b/src/compiler/parse_expr.c @@ -1120,6 +1120,7 @@ ParseRule rules[TOKEN_EOF + 1] = { [TOKEN_QUAD] = { parse_type_identifier, NULL, PREC_NONE }, [TOKEN_VOID] = { parse_type_identifier, NULL, PREC_NONE }, [TOKEN_TYPEID] = { parse_type_identifier, NULL, PREC_NONE }, + [TOKEN_ERR] = { parse_type_identifier, NULL, PREC_NONE }, [TOKEN_ELSE] = { NULL, parse_else_expr, PREC_TRY_ELSE }, [TOKEN_QUESTION] = { NULL, parse_ternary_expr, PREC_TERNARY }, diff --git a/test/test_suite/errors/error_union.c3 b/test/test_suite/errors/error_union.c3 new file mode 100644 index 000000000..41014a270 --- /dev/null +++ b/test/test_suite/errors/error_union.c3 @@ -0,0 +1,8 @@ +module foo; + +error Blurg; + +func void main() +{ + error foo; +} \ No newline at end of file