mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Fix #4962
This commit is contained in:
@@ -1675,12 +1675,16 @@ gb_internal bool check_builtin_procedure_directive(CheckerContext *c, Operand *o
|
|||||||
}
|
}
|
||||||
if (ce->args.count > 0) {
|
if (ce->args.count > 0) {
|
||||||
Ast *arg = ce->args[0];
|
Ast *arg = ce->args[0];
|
||||||
Operand o = {};
|
if (arg->kind != Ast_Ident) {
|
||||||
Entity *e = check_ident(c, &o, arg, nullptr, nullptr, true);
|
error(arg, "'#caller_expression' expected an identifier");
|
||||||
if (e == nullptr || (e->flags & EntityFlag_Param) == 0) {
|
} else {
|
||||||
error(ce->args[0], "'#caller_expression' expected a valid earlier parameter name");
|
Operand o = {};
|
||||||
|
Entity *e = check_ident(c, &o, arg, nullptr, nullptr, true);
|
||||||
|
if (e == nullptr || (e->flags & EntityFlag_Param) == 0) {
|
||||||
|
error(arg, "'#caller_expression' expected a valid earlier parameter name");
|
||||||
|
}
|
||||||
|
arg->Ident.entity = e;
|
||||||
}
|
}
|
||||||
arg->Ident.entity = e;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
operand->type = t_string;
|
operand->type = t_string;
|
||||||
|
|||||||
Reference in New Issue
Block a user