aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-06-15 19:59:35 +0100
committergingerBill <bill@gingerbill.org>2018-06-15 19:59:35 +0100
commit5081ea1a0c2469ed77531a6a6718a9de86f1d140 (patch)
tree1d66bd9a94fe6d97575dd7f4cb6d2d21e5871dac /src/check_type.cpp
parente9e7ce2606ae18dd96fde356860fe613ff5c5430 (diff)
Fix type aliasing comparison; Fix gb_utf8_decode
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) {