mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-03 17:24:39 +00:00
Fix #3530
This commit is contained in:
@@ -3499,6 +3499,10 @@ gb_internal Ast *parse_type(AstFile *f) {
|
||||
Token token = advance_token(f);
|
||||
syntax_error(token, "Expected a type");
|
||||
return ast_bad_expr(f, token, f->curr_token);
|
||||
} else if (type->kind == Ast_ParenExpr &&
|
||||
unparen_expr(type) == nullptr) {
|
||||
syntax_error(type, "Expected a type within the parentheses");
|
||||
return ast_bad_expr(f, type->ParenExpr.open, type->ParenExpr.close);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user