mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Show error message when something like this is done test: proc() : {}
This commit is contained in:
@@ -174,6 +174,10 @@ void check_init_constant(CheckerContext *ctx, Entity *e, Operand *operand) {
|
|||||||
return;
|
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->parent_proc_decl = ctx->curr_proc_decl;
|
||||||
|
|
||||||
e->Constant.value = operand->value;
|
e->Constant.value = operand->value;
|
||||||
|
|||||||
Reference in New Issue
Block a user