aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index a6764de08..c9275c7f2 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -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;