diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-10-10 12:04:22 +0100 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-10-10 12:04:22 +0100 |
| commit | 1387c3d311db07edb36d8db5d0a2befb8417b771 (patch) | |
| tree | 21f884486b968dff63087489b4afd8c08a6bc44b /src | |
| parent | 24bc044d78c5d02e174b15490a0f8f5289b0cb03 (diff) | |
Remove unneeded type expression
Diffstat (limited to 'src')
| -rw-r--r-- | src/check_builtin.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp index fb7b29edd..fcd2200dc 100644 --- a/src/check_builtin.cpp +++ b/src/check_builtin.cpp @@ -4923,8 +4923,6 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As Type *elem_type = base_any_array_type(lhs.type); - Ast *type_ast = lhs_cl->type; - Array<Ast *> new_elems = {}; array_init(&new_elems, heap_allocator()); @@ -4991,13 +4989,10 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As } } - if (type_ast == nullptr) { - type_ast = extra_cl->type; - } array_add_elems(&new_elems, extra_cl->elems.data, extra_cl->elems.count); } - Ast *new_compound_lit = ast_compound_lit(lhs.expr->file(), type_ast, new_elems, ast_token(lhs.expr), ast_end_token(ce->args[ce->args.count-1])); + Ast *new_compound_lit = ast_compound_lit(lhs.expr->file(), nullptr, new_elems, ast_token(lhs.expr), ast_end_token(ce->args[ce->args.count-1])); operand->mode = Addressing_Constant; operand->value = exact_value_compound(new_compound_lit); |