| ... | @@ -1977,6 +1977,10 @@ static Error resolve_union_alignment(CodeGen *g, ZigType *union_type) { | ... | @@ -1977,6 +1977,10 @@ static Error resolve_union_alignment(CodeGen *g, ZigType *union_type) { |
| 1977 | field->align = field->type_entry->abi_align; | 1977 | field->align = field->type_entry->abi_align; |
| 1978 | } else { | 1978 | } else { |
| 1979 | if ((err = type_val_resolve_abi_align(g, field->type_val, &field->align))) { | 1979 | if ((err = type_val_resolve_abi_align(g, field->type_val, &field->align))) { |
| | 1980 | if (g->trace_err != nullptr) { |
| | 1981 | g->trace_err = add_error_note(g, g->trace_err, field->decl_node, |
| | 1982 | buf_create_from_str("while checking this field")); |
| | 1983 | } |
| 1980 | union_type->data.unionation.resolve_status = ResolveStatusInvalid; | 1984 | union_type->data.unionation.resolve_status = ResolveStatusInvalid; |
| 1981 | return err; | 1985 | return err; |
| 1982 | } | 1986 | } |
| ... | @@ -2497,6 +2501,10 @@ static Error resolve_struct_alignment(CodeGen *g, ZigType *struct_type) { | ... | @@ -2497,6 +2501,10 @@ static Error resolve_struct_alignment(CodeGen *g, ZigType *struct_type) { |
| 2497 | field->align = 1; | 2501 | field->align = 1; |
| 2498 | } else { | 2502 | } else { |
| 2499 | if ((err = type_val_resolve_abi_align(g, field->type_val, &field->align))) { | 2503 | if ((err = type_val_resolve_abi_align(g, field->type_val, &field->align))) { |
| | 2504 | if (g->trace_err != nullptr) { |
| | 2505 | g->trace_err = add_error_note(g, g->trace_err, field->decl_node, |
| | 2506 | buf_create_from_str("while checking this field")); |
| | 2507 | } |
| 2500 | struct_type->data.structure.resolve_status = ResolveStatusInvalid; | 2508 | struct_type->data.structure.resolve_status = ResolveStatusInvalid; |
| 2501 | return err; | 2509 | return err; |
| 2502 | } | 2510 | } |