diff options
| author | gingerBill <bill@gingerbill.org> | 2019-08-31 14:48:56 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-08-31 14:48:56 +0100 |
| commit | b311540b1672129e87a7249650a19cf11d2fccef (patch) | |
| tree | e8b352fd7b21dbdee040a213e4e6fbf83ed227e3 /src/check_decl.cpp | |
| parent | 07ced1cf0eed9c30813d49dad0c33f29f0c161ef (diff) | |
Make `require_results` an attribute rather than a suffix tag for procedures
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index b5b9dc61d..7e019d82b 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -654,7 +654,6 @@ void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) { bool is_foreign = e->Procedure.is_foreign; bool is_export = e->Procedure.is_export; - bool is_require_results = (pl->tags & ProcTag_require_results) != 0; if (e->pkg != nullptr && e->token.string == "main") { if (pt->param_count != 0 || @@ -714,10 +713,10 @@ void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) { } } - if (pt->result_count == 0 && is_require_results) { - error(pl->type, "'#require_results' is not needed on a procedure with no results"); + if (pt->result_count == 0 && ac.require_results) { + error(pl->type, "'require_results' is not needed on a procedure with no results"); } else { - pt->require_results = is_require_results; + pt->require_results = ac.require_results; } if (ac.link_name.len > 0) { |