From beaad719adf592868bbb878d2e263a8aa6238ec5 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 5 Aug 2021 17:51:45 +0100 Subject: Reallow `using` on enum declarations temporarily but with a warning. --- src/check_decl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/check_decl.cpp') diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 7e9ed0a1e..a8f1f9aec 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -295,7 +295,7 @@ 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 + #if 1 // NOTE(bill): Must be an enum declaration if (te->kind == Ast_EnumType) { Scope *parent = e->scope; -- cgit v1.2.3