diff --git a/dmd2/declaration.c b/dmd2/declaration.c index b063d6ce4d5..fef48c17b30 100644 --- a/dmd2/declaration.c +++ b/dmd2/declaration.c @@ -557,7 +557,7 @@ void AliasDeclaration::semantic(Scope *sc) if (s && ((s->getType() && type->equals(s->getType())) || s->isEnumMember())) goto L2; // it's a symbolic alias - type = type->addStorageClass(storage_class); + type = type->addSTC(storage_class); if (storage_class & (STCref | STCnothrow | STCnogc | STCpure | STCdisable)) { // For 'ref' to be attached to function types, and picked @@ -569,6 +569,7 @@ void AliasDeclaration::semantic(Scope *sc) } else type->resolve(loc, sc, &e, &t, &s); + if (s) { goto L2;