Browse Source

Reallow `using` on enum declarations temporarily but with a warning.

gingerBill 4 years ago
parent
commit
beaad719ad
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/check_decl.cpp

+ 1 - 1
src/check_decl.cpp

@@ -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;