diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-10-11 22:20:43 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-10-12 12:14:47 +0200 |
commit | 893f9543bff19aa3be07fff05bf1abf6a0b8dd56 (patch) | |
tree | a135603beb9eeb81b83fc89da164a22bdf0ba2aa /gcc/d/dmd/declaration.c | |
parent | 19f6b41a3a12c67ccbc51c5b729954c4ccaf1176 (diff) | |
download | gcc-893f9543bff19aa3be07fff05bf1abf6a0b8dd56.zip gcc-893f9543bff19aa3be07fff05bf1abf6a0b8dd56.tar.gz gcc-893f9543bff19aa3be07fff05bf1abf6a0b8dd56.tar.bz2 |
d: Merge upstream dmd 70aabfb51
Fixes a symbol resolver bug where a private alias becomes public if used
before its declaration.
Reviewed-on: https://github.com/dlang/dmd/pull/11831
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd 70aabfb51
Diffstat (limited to 'gcc/d/dmd/declaration.c')
-rw-r--r-- | gcc/d/dmd/declaration.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/d/dmd/declaration.c b/gcc/d/dmd/declaration.c index 08b2950..f490cc5 100644 --- a/gcc/d/dmd/declaration.c +++ b/gcc/d/dmd/declaration.c @@ -340,6 +340,13 @@ void AliasDeclaration::semantic(Scope *sc) void AliasDeclaration::aliasSemantic(Scope *sc) { //printf("AliasDeclaration::semantic() %s\n", toChars()); + + // as AliasDeclaration::semantic, in case we're called first. + // see https://issues.dlang.org/show_bug.cgi?id=21001 + storage_class |= sc->stc & STCdeprecated; + protection = sc->protection; + userAttribDecl = sc->userAttribDecl; + // TypeTraits needs to know if it's located in an AliasDeclaration sc->flags |= SCOPEalias; |