mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Reallow using on enum declarations temporarily but with a warning.
This commit is contained in:
+1
-1
@@ -295,7 +295,7 @@ void check_type_decl(CheckerContext *ctx, Entity *e, Ast *init_expr, Type *def)
|
|||||||
// using decl
|
// using decl
|
||||||
if (decl->is_using) {
|
if (decl->is_using) {
|
||||||
warning(init_expr, "'using' an enum declaration is not allowed, prefer using implicit selector expressions e.g. '.A'");
|
warning(init_expr, "'using' an enum declaration is not allowed, prefer using implicit selector expressions e.g. '.A'");
|
||||||
#if 0
|
#if 1
|
||||||
// NOTE(bill): Must be an enum declaration
|
// NOTE(bill): Must be an enum declaration
|
||||||
if (te->kind == Ast_EnumType) {
|
if (te->kind == Ast_EnumType) {
|
||||||
Scope *parent = e->scope;
|
Scope *parent = e->scope;
|
||||||
|
|||||||
Reference in New Issue
Block a user