mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-05 04:27:51 +00:00
Simplify/Fix the state_flag behaviour for code generation
This commit is contained in:
@@ -2170,6 +2170,14 @@ Ast *parse_operand(AstFile *f, bool lhs) {
|
||||
body = parse_body(f);
|
||||
f->curr_proc = curr_proc;
|
||||
|
||||
// Apply the tags directly to the body rather than the type
|
||||
if (tags & ProcTag_no_bounds_check) {
|
||||
body->state_flags |= StateFlag_no_bounds_check;
|
||||
}
|
||||
if (tags & ProcTag_bounds_check) {
|
||||
body->state_flags |= StateFlag_bounds_check;
|
||||
}
|
||||
|
||||
return ast_proc_lit(f, type, body, tags, where_token, where_clauses);
|
||||
} else if (allow_token(f, Token_do)) {
|
||||
Ast *curr_proc = f->curr_proc;
|
||||
|
||||
Reference in New Issue
Block a user