diff --git a/dmd2/enum.c b/dmd2/enum.c index df01847e..1addb844 100644 --- a/dmd2/enum.c +++ b/dmd2/enum.c @@ -38,6 +38,8 @@ EnumDeclaration::EnumDeclaration(Loc loc, Identifier *id, Type *memtype) #if IN_DMD objFileDone = 0; #endif + protection = PROTundefined; + parent = NULL; } Dsymbol *EnumDeclaration::syntaxCopy(Dsymbol *s) @@ -79,6 +81,10 @@ void EnumDeclaration::semantic0(Scope *sc) if (isdone || !scope) return; + + parent = scope->parent; + protection = scope->protection; + if (!isAnonymous() || memtype) return; for (size_t i = 0; i < members->dim; i++)