Skip to content

Commit ec7bc3b

Browse files
CHIKI BadreddineCHIKI Badreddine
authored andcommitted
Fix bugzilla issue 22688 - Disambiguate module and struct mangling
1 parent e3c9e82 commit ec7bc3b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compiler/src/dmd/mangle/package.d

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,8 @@ public:
568568
else if (p.getIdent())
569569
{
570570
mangleIdentifier(p.ident, s);
571+
if (p.isModule() || p.isPackage())
572+
buf.writeByte('M');
571573
if (FuncDeclaration f = p.isFuncDeclaration())
572574
mangleFunc(f, true);
573575
}
@@ -921,7 +923,11 @@ public:
921923
}
922924
mangleParent(s);
923925
if (s.ident)
926+
{
924927
mangleIdentifier(s.ident, s);
928+
if (s.isModule() || s.isPackage())
929+
buf.writeByte('M');
930+
}
925931
else
926932
toBuffer(*buf, s.toString(), s);
927933
//printf("Dsymbol.mangle() %s = %s\n", s.toChars(), id);

0 commit comments

Comments
 (0)