mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
Allow single field struct #raw_union
This commit is contained in:
+1
-1
@@ -333,7 +333,7 @@ void check_struct_type(CheckerContext *ctx, Type *struct_type, Ast *node, Array<
|
|||||||
|
|
||||||
scope_reserve(ctx->scope, min_field_count);
|
scope_reserve(ctx->scope, min_field_count);
|
||||||
|
|
||||||
if (st->is_raw_union) {
|
if (st->is_raw_union && min_field_count > 1) {
|
||||||
struct_type->Struct.is_raw_union = true;
|
struct_type->Struct.is_raw_union = true;
|
||||||
context = str_lit("struct #raw_union");
|
context = str_lit("struct #raw_union");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user