diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-09-23 15:18:02 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-09-23 15:18:02 -0400 |
| commit | e06885d64e3569719e9479c7069da7ad426a70d3 (patch) | |
| tree | 075258e85acce6c4d5fb3a29225fc0d97fabfb26 /src/parseh.cpp | |
| parent | 9ec6a78f121c8f61c10ea02f6949f27b0228ba16 (diff) | |
| download | zig-e06885d64e3569719e9479c7069da7ad426a70d3.tar.gz zig-e06885d64e3569719e9479c7069da7ad426a70d3.zip | |
enums support member functions
Diffstat (limited to 'src/parseh.cpp')
| -rw-r--r-- | src/parseh.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<TypeEnumField>(field_count); ZigLLVMDIEnumerator **di_enumerators = allocate<ZigLLVMDIEnumerator*>(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); |
