aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-02-28 12:32:51 +0000
committergingerBill <bill@gingerbill.org>2022-02-28 12:32:51 +0000
commit45124e4d5c19d477c2fc80282e153cc0bb7ac6ff (patch)
treeb5bd3d72b4b5f7909f67d65358e6e3ad25fb8714 /src/check_decl.cpp
parent32988b03632912bbdb788e3dc319592a1dab9bfe (diff)
parent7681c43b144015278b75b2788b824a5630f6ccd6 (diff)
Merge branch 'master' into freestanding_amd64
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp4
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;