aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 7b0ff8488..231f69aa2 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -603,6 +603,10 @@ void check_enum_type(CheckerContext *ctx, Type *enum_type, Type *named_type, Ast
enum_type->Enum.is_export = et->is_export;
if (et->is_export) {
Scope *parent = ctx->scope->parent;
+ if (parent->is_file) {
+ // NOTE(bhall): Use package scope
+ parent = parent->parent;
+ }
for_array(i, fields) {
Entity *f = fields[i];
if (f->kind != Entity_Constant) {