aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp26
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'");
}
}