aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/check_decl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index 2bf21c676..7e9ed0a1e 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -294,6 +294,8 @@ void check_type_decl(CheckerContext *ctx, Entity *e, Ast *init_expr, Type *def)
// 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 0
// NOTE(bill): Must be an enum declaration
if (te->kind == Ast_EnumType) {
Scope *parent = e->scope;
@@ -317,6 +319,7 @@ void check_type_decl(CheckerContext *ctx, Entity *e, Ast *init_expr, Type *def)
}
}
}
+ #endif
}
}