diff options
| author | Jason Kercher <JKercher@JSM.lcl> | 2022-03-09 17:17:40 -0500 |
|---|---|---|
| committer | Jason Kercher <JKercher@JSM.lcl> | 2022-03-09 17:17:40 -0500 |
| commit | d2bc41a2df1612f8b3eb8300413be8b3f8bff895 (patch) | |
| tree | 8987434f10036be298ce8cb93726b6a43f372dbf /src/check_decl.cpp | |
| parent | bea2f3644325454e7fe0e12313528359d0782843 (diff) | |
| parent | dc8d28c383a404d01dcbcb65ba84ff814da9424e (diff) | |
Merge remote-tracking branch 'upstream/master' into fix_odin_test
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 45d741532..3fdd944f9 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -174,6 +174,10 @@ void check_init_constant(CheckerContext *ctx, Entity *e, Operand *operand) { return; } + if (is_type_proc(e->type)) { + error(e->token, "Illegal declaration of a constant procedure value"); + } + e->parent_proc_decl = ctx->curr_proc_decl; e->Constant.value = operand->value; |