From 5081ea1a0c2469ed77531a6a6718a9de86f1d140 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Fri, 15 Jun 2018 19:59:35 +0100 Subject: Fix type aliasing comparison; Fix gb_utf8_decode --- src/check_type.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/check_type.cpp') 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) { -- cgit v1.2.3