From e06885d64e3569719e9479c7069da7ad426a70d3 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 23 Sep 2016 15:18:02 -0400 Subject: enums support member functions --- src/parseh.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/parseh.cpp') diff --git a/src/parseh.cpp b/src/parseh.cpp index d3c964d3db..307129d4a0 100644 --- a/src/parseh.cpp +++ b/src/parseh.cpp @@ -870,7 +870,7 @@ static TypeTableEntry *resolve_enum_decl(Context *c, const EnumDecl *enum_decl) enum_type->data.enumeration.complete = true; enum_type->data.enumeration.tag_type = tag_type_entry; - enum_type->data.enumeration.field_count = field_count; + enum_type->data.enumeration.src_field_count = field_count; enum_type->data.enumeration.fields = allocate(field_count); ZigLLVMDIEnumerator **di_enumerators = allocate(field_count); @@ -977,7 +977,7 @@ static void visit_enum_decl(Context *c, const EnumDecl *enum_decl) { enum_node->data.struct_decl.top_level_decl.visib_mod = VisibModExport; enum_node->data.struct_decl.type_entry = enum_type; - for (uint32_t i = 0; i < enum_type->data.enumeration.field_count; i += 1) { + for (uint32_t i = 0; i < enum_type->data.enumeration.src_field_count; i += 1) { TypeEnumField *type_enum_field = &enum_type->data.enumeration.fields[i]; AstNode *type_node = make_type_node(c, type_enum_field->type_entry); AstNode *field_node = create_struct_field_node(c, buf_ptr(type_enum_field->name), type_node); -- cgit v1.2.3