mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-12 11:09:25 -04:00
Fix dynamic array index = value with const value initializing to 0
This commit is contained in:
1 parent
cec08114fd
commit
8530829ca4
1 file changed
+1
-1
@@ -3657,7 +3657,7 @@ gb_internal void lb_build_addr_compound_lit_populate(lbProcedure *p, Slice<Ast *
|
||||
Ast *elem = elems[i];
|
||||
if (elem->kind == Ast_FieldValue) {
|
||||
ast_node(fv, FieldValue, elem);
|
||||
if (lb_is_elem_const(fv->value, et)) {
|
||||
if (bt->kind != Type_DynamicArray && lb_is_elem_const(fv->value, et)) {
|
||||
continue;
|
||||
}
|
||||
if (is_ast_range(fv->field)) {
|
||||
|
||||
Reference in new issue
Block a user