From 41b6d215bb381ecb4190acd8cbde481442b7ab85 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 3 Mar 2018 20:07:12 +0000 Subject: Fix `using` determination order --- src/check_expr.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/check_expr.cpp') diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 853760204..16145109f 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -3621,7 +3621,7 @@ break; isize variable_count = type->Struct.fields.count; array_init(&tuple->Tuple.variables, a, variable_count); // TODO(bill): Should I copy each of the entities or is this good enough? - gb_memcopy_array(tuple->Tuple.variables.data, type->Struct.fields_in_src_order.data, variable_count); + gb_memcopy_array(tuple->Tuple.variables.data, type->Struct.fields.data, variable_count); operand->type = tuple; operand->mode = Addressing_Value; @@ -5370,7 +5370,7 @@ ExprKind check_expr_base_internal(Checker *c, Operand *o, AstNode *node, Type *t isize field_count = t->Struct.fields.count; isize min_field_count = t->Struct.fields.count; for (isize i = min_field_count-1; i >= 0; i--) { - Entity *e = t->Struct.fields_in_src_order[i]; + Entity *e = t->Struct.fields[i]; GB_ASSERT(e->kind == Entity_Variable); if (e->Variable.default_is_nil) { min_field_count--; @@ -5454,7 +5454,7 @@ ExprKind check_expr_base_internal(Checker *c, Operand *o, AstNode *node, Type *t } if (field == nullptr) { - field = t->Struct.fields_in_src_order[index]; + field = t->Struct.fields[index]; } check_expr_with_type_hint(c, o, elem, field->type); -- cgit v1.2.3