mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-14 23:33:15 +00:00
Add @require for global variables
This commit is contained in:
@@ -843,6 +843,11 @@ void check_global_variable_decl(CheckerContext *ctx, Entity *e, Ast *type_expr,
|
||||
check_decl_attributes(ctx, decl->attributes, var_decl_attribute, &ac);
|
||||
}
|
||||
|
||||
if (ac.require_declaration) {
|
||||
array_add(&ctx->info->required_global_variables, e);
|
||||
}
|
||||
|
||||
|
||||
e->Variable.thread_local_model = ac.thread_local_model;
|
||||
e->Variable.is_export = ac.is_export;
|
||||
if (ac.is_static) {
|
||||
|
||||
Reference in New Issue
Block a user