Allow unions with one variant to be constant

This commit is contained in:
gingerBill
2025-09-19 11:56:44 +01:00
parent 1a4da5cb0f
commit 6338e0a8a3
4 changed files with 82 additions and 4 deletions

View File

@@ -1565,7 +1565,7 @@ gb_internal void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) {
}
}
gb_internal void check_global_variable_decl(CheckerContext *ctx, Entity *&e, Ast *type_expr, Ast *init_expr) {
gb_internal void check_global_variable_decl(CheckerContext *ctx, Entity *e, Ast *type_expr, Ast *init_expr) {
GB_ASSERT(e->type == nullptr);
GB_ASSERT(e->kind == Entity_Variable);