Skip to content

Commit af81842

Browse files
author
CHIKI Badreddine
committed
Visit template arguments in toobj.d to fix linker error
1 parent f2d84be commit af81842

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

compiler/src/dmd/glue/toobj.d

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,15 @@ void toObjFile(Dsymbol ds, bool multiobj)
815815
}
816816
//printf("TemplateInstance.toObjFile(%p, '%s')\n", ti, ti.toPrettyChars());
817817

818+
if (ti.tiargs)
819+
{
820+
foreach (o; *ti.tiargs)
821+
{
822+
if (auto s = isDsymbol(o))
823+
s.accept(this);
824+
}
825+
}
826+
818827
if (multiobj)
819828
{
820829
// Append to list of object files to be written later
@@ -832,6 +841,15 @@ void toObjFile(Dsymbol ds, bool multiobj)
832841
//printf("TemplateMixin.toObjFile('%s')\n", tm.toChars());
833842
if (!isError(tm))
834843
{
844+
if (tm.tiargs)
845+
{
846+
foreach (o; *tm.tiargs)
847+
{
848+
if (auto s = isDsymbol(o))
849+
s.accept(this);
850+
}
851+
}
852+
835853
tm.members.foreachDsymbol( (s) { s.accept(this); } );
836854
}
837855
}

0 commit comments

Comments
 (0)