mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Extra sanity check around static
This commit is contained in:
@@ -2083,10 +2083,17 @@ void lb_build_stmt(lbProcedure *p, Ast *node) {
|
|||||||
|
|
||||||
bool is_static = false;
|
bool is_static = false;
|
||||||
if (vd->names.count > 0) {
|
if (vd->names.count > 0) {
|
||||||
Entity *e = entity_of_node(vd->names[0]);
|
for_array(i, vd->names) {
|
||||||
if (e->flags & EntityFlag_Static) {
|
Ast *name = vd->names[i];
|
||||||
// NOTE(bill): If one of the entities is static, they all are
|
if (!is_blank_ident(name)) {
|
||||||
is_static = true;
|
Entity *e = entity_of_node(name);
|
||||||
|
GB_ASSERT(e != nullptr);
|
||||||
|
if (e->flags & EntityFlag_Static) {
|
||||||
|
// NOTE(bill): If one of the entities is static, they all are
|
||||||
|
is_static = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user