aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-08-17 15:24:44 +0100
committergingerBill <bill@gingerbill.org>2018-08-17 15:24:44 +0100
commit1d0ac72e4a6851effe0a9310a26974675c177cc1 (patch)
treef274bd0323db255a81bdfd1ce6212d32f89ea555 /src/check_decl.cpp
parentb216e44870b1883cf3fb71994eb94f642fea43a1 (diff)
Disable non-comparison operations for enum (use `bit_set` for flags)
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index 9d6c4cc65..8569ee437 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -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;