diff options
| author | gingerBill <bill@gingerbill.org> | 2018-07-29 10:50:15 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-07-29 10:50:15 +0100 |
| commit | 6512a3e5f24a3aecb1451f921455a93231412104 (patch) | |
| tree | e784404bf3ad291c54314e9ab9690e9bd9da754f /src/types.cpp | |
| parent | 49f2124df0f644e183f0570dd047493678eaf9f1 (diff) | |
using Foo :: enum {A, B, C}; len(Foo)
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/types.cpp b/src/types.cpp index 46ce0ee26..e0ab91e90 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -131,14 +131,11 @@ struct TypeStruct { TYPE_KIND(Struct, TypeStruct) \ TYPE_KIND(Enum, struct { \ Array<Entity *> fields; \ - Ast *node; \ + Ast *node; \ Scope * scope; \ Entity * names; \ Type * base_type; \ - bool is_export; \ - Entity * count; \ - Entity * min_value; \ - Entity * max_value; \ + bool is_using; \ }) \ TYPE_KIND(Union, struct { \ Array<Type *> variants; \ @@ -1657,21 +1654,6 @@ Selection lookup_field_with_selection(Type *type_, String field_name, bool is_ty if (is_type_enum(type)) { // NOTE(bill): These may not have been added yet, so check in case - if (type->Enum.count != nullptr) { - if (field_name == "count") { - sel.entity = type->Enum.count; - return sel; - } - if (field_name == "min_value") { - sel.entity = type->Enum.min_value; - return sel; - } - if (field_name == "max_value") { - sel.entity = type->Enum.max_value; - return sel; - } - } - for_array(i, type->Enum.fields) { Entity *f = type->Enum.fields[i]; GB_ASSERT(f->kind == Entity_Constant); |