| ... | @@ -2180,7 +2180,7 @@ static Error resolve_struct_type(CodeGen *g, ZigType *struct_type) { | ... | @@ -2180,7 +2180,7 @@ static Error resolve_struct_type(CodeGen *g, ZigType *struct_type) { |
| 2180 | ZigType *field_type = resolve_struct_field_type(g, field); | 2180 | ZigType *field_type = resolve_struct_field_type(g, field); |
| 2181 | if (field_type == nullptr) { | 2181 | if (field_type == nullptr) { |
| 2182 | struct_type->data.structure.resolve_status = ResolveStatusInvalid; | 2182 | struct_type->data.structure.resolve_status = ResolveStatusInvalid; |
| 2183 | return err; | 2183 | return ErrorSemanticAnalyzeFail; |
| 2184 | } | 2184 | } |
| 2185 | if ((err = type_resolve(g, field->type_entry, ResolveStatusSizeKnown))) { | 2185 | if ((err = type_resolve(g, field->type_entry, ResolveStatusSizeKnown))) { |
| 2186 | struct_type->data.structure.resolve_status = ResolveStatusInvalid; | 2186 | struct_type->data.structure.resolve_status = ResolveStatusInvalid; |
| ... | @@ -2270,7 +2270,7 @@ static Error resolve_struct_type(CodeGen *g, ZigType *struct_type) { | ... | @@ -2270,7 +2270,7 @@ static Error resolve_struct_type(CodeGen *g, ZigType *struct_type) { |
| 2270 | ZigType *field_type = resolve_struct_field_type(g, field); | 2270 | ZigType *field_type = resolve_struct_field_type(g, field); |
| 2271 | if (field_type == nullptr) { | 2271 | if (field_type == nullptr) { |
| 2272 | struct_type->data.structure.resolve_status = ResolveStatusInvalid; | 2272 | struct_type->data.structure.resolve_status = ResolveStatusInvalid; |
| 2273 | return err; | 2273 | return ErrorSemanticAnalyzeFail; |
| 2274 | } | 2274 | } |
| 2275 | | 2275 | |
| 2276 | if ((err = type_resolve(g, field_type, ResolveStatusSizeKnown))) { | 2276 | if ((err = type_resolve(g, field_type, ResolveStatusSizeKnown))) { |
| ... | @@ -2340,7 +2340,7 @@ static Error resolve_union_alignment(CodeGen *g, ZigType *union_type) { | ... | @@ -2340,7 +2340,7 @@ static Error resolve_union_alignment(CodeGen *g, ZigType *union_type) { |
| 2340 | &field->align)) | 2340 | &field->align)) |
| 2341 | { | 2341 | { |
| 2342 | union_type->data.unionation.resolve_status = ResolveStatusInvalid; | 2342 | union_type->data.unionation.resolve_status = ResolveStatusInvalid; |
| 2343 | return err; | 2343 | return ErrorSemanticAnalyzeFail; |
| 2344 | } | 2344 | } |
| 2345 | add_node_error(g, field->decl_node, | 2345 | add_node_error(g, field->decl_node, |
| 2346 | buf_create_from_str("TODO implement field alignment syntax for unions. https://github.com/ziglang/zig/issues/3125")); | 2346 | buf_create_from_str("TODO implement field alignment syntax for unions. https://github.com/ziglang/zig/issues/3125")); |
| ... | @@ -2467,6 +2467,7 @@ static Error resolve_union_type(CodeGen *g, ZigType *union_type) { | ... | @@ -2467,6 +2467,7 @@ static Error resolve_union_type(CodeGen *g, ZigType *union_type) { |
| 2467 | union_type->data.unionation.resolve_status = ResolveStatusInvalid; | 2467 | union_type->data.unionation.resolve_status = ResolveStatusInvalid; |
| 2468 | return ErrorSemanticAnalyzeFail; | 2468 | return ErrorSemanticAnalyzeFail; |
| 2469 | } | 2469 | } |
| | 2470 | |
| 2470 | if (is_packed) { | 2471 | if (is_packed) { |
| 2471 | if ((err = emit_error_unless_type_allowed_in_packed_union(g, field_type, union_field->decl_node))) { | 2472 | if ((err = emit_error_unless_type_allowed_in_packed_union(g, field_type, union_field->decl_node))) { |
| 2472 | union_type->data.unionation.resolve_status = ResolveStatusInvalid; | 2473 | union_type->data.unionation.resolve_status = ResolveStatusInvalid; |
| ... | @@ -2925,7 +2926,7 @@ static Error resolve_struct_alignment(CodeGen *g, ZigType *struct_type) { | ... | @@ -2925,7 +2926,7 @@ static Error resolve_struct_alignment(CodeGen *g, ZigType *struct_type) { |
| 2925 | &field->align)) | 2926 | &field->align)) |
| 2926 | { | 2927 | { |
| 2927 | struct_type->data.structure.resolve_status = ResolveStatusInvalid; | 2928 | struct_type->data.structure.resolve_status = ResolveStatusInvalid; |
| 2928 | return err; | 2929 | return ErrorSemanticAnalyzeFail; |
| 2929 | } | 2930 | } |
| 2930 | } else if (packed) { | 2931 | } else if (packed) { |
| 2931 | field->align = 1; | 2932 | field->align = 1; |