summaryrefslogtreecommitdiff
path: root/gcc/d/dmd/dsymbolsem.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/d/dmd/dsymbolsem.d')
-rw-r--r--gcc/d/dmd/dsymbolsem.d3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/d/dmd/dsymbolsem.d b/gcc/d/dmd/dsymbolsem.d
index be8f9150903..c5766787bf0 100644
--- a/gcc/d/dmd/dsymbolsem.d
+++ b/gcc/d/dmd/dsymbolsem.d
@@ -4407,7 +4407,10 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor
invd.semanticRun < PASS.semantic &&
!ad.isUnionDeclaration() // users are on their own with union fields
)
+ {
+ invd.fixupInvariantIdent(ad.invs.length);
ad.invs.push(invd);
+ }
if (!invd.type)
invd.type = new TypeFunction(ParameterList(), Type.tvoid, LINK.d, invd.storage_class);