diff options
| author | gingerBill <bill@gingerbill.org> | 2023-08-01 11:11:15 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-08-01 11:11:15 +0100 |
| commit | 69e1f42aedad0d1992e64989aac1d236bee3d4d9 (patch) | |
| tree | c2d26c92e0120cc97d14196fcb5e28fa9cd51133 /src/check_decl.cpp | |
| parent | c35c58b023ec98aa7d42498b9ece68cf481f2c32 (diff) | |
Replace a lot of warnings with errors; remove deprecated stuff
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 9e96dae1c..4a1a636f8 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -354,31 +354,7 @@ gb_internal void check_type_decl(CheckerContext *ctx, Entity *e, Ast *init_expr, // using decl if (decl->is_using) { - warning(init_expr, "'using' an enum declaration is not allowed, prefer using implicit selector expressions e.g. '.A'"); - #if 1 - // NOTE(bill): Must be an enum declaration - if (te->kind == Ast_EnumType) { - Scope *parent = e->scope; - if (parent->flags&ScopeFlag_File) { - // NOTE(bill): Use package scope - parent = parent->parent; - } - - Type *t = base_type(e->type); - if (t->kind == Type_Enum) { - for (Entity *f : t->Enum.fields) { - if (f->kind != Entity_Constant) { - continue; - } - String name = f->token.string; - if (is_blank_ident(name)) { - continue; - } - add_entity(ctx, parent, nullptr, f); - } - } - } - #endif + error(init_expr, "'using' an enum declaration is not allowed, prefer using implicit selector expressions e.g. '.A'"); } } |