| ... | ... | @@ -3588,6 +3588,7 @@ ZigType *validate_var_type(CodeGen *g, AstNode *source_node, ZigType *type_entry |
| 3588 | 3588 | ZigVar *add_variable(CodeGen *g, AstNode *source_node, Scope *parent_scope, Buf *name, |
| 3589 | 3589 | bool is_const, ConstExprValue *value, Tld *src_tld) |
| 3590 | 3590 | { |
| 3591 | Error err; |
| 3591 | 3592 | assert(value); |
| 3592 | 3593 | |
| 3593 | 3594 | ZigVar *variable_entry = allocate<ZigVar>(1); |
| ... | ... | @@ -3600,7 +3601,9 @@ ZigVar *add_variable(CodeGen *g, AstNode *source_node, Scope *parent_scope, Buf |
| 3600 | 3601 | assert(name); |
| 3601 | 3602 | buf_init_from_buf(&variable_entry->name, name); |
| 3602 | 3603 | |
| 3603 | | if (!type_is_invalid(value->type)) { |
| 3604 | if ((err = type_resolve(g, value->type, ResolveStatusAlignmentKnown))) { |
| 3605 | variable_entry->value->type = g->builtin_types.entry_invalid; |
| 3606 | } else { |
| 3604 | 3607 | variable_entry->align_bytes = get_abi_alignment(g, value->type); |
| 3605 | 3608 | |
| 3606 | 3609 | ZigVar *existing_var = find_variable(g, parent_scope, name, nullptr); |