Disable non-comparison operations for enum (use bit_set for flags)

This commit is contained in:
gingerBill
2018-08-17 15:24:44 +01:00
parent b216e44870
commit 1d0ac72e4a
3 changed files with 17 additions and 14 deletions
+1 -1
View File
@@ -253,7 +253,7 @@ void check_type_decl(CheckerContext *ctx, Entity *e, Ast *type_expr, Type *def)
if (decl->is_using) {
// NOTE(bill): Must be an enum declaration
if (te->kind == Ast_EnumType) {
Scope *parent = ctx->scope->parent;
Scope *parent = e->scope;
if (parent->flags&ScopeFlag_File) {
// NOTE(bill): Use package scope
parent = parent->parent;