Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion dmd/dtemplate.d
Original file line number Diff line number Diff line change
Expand Up @@ -7858,15 +7858,22 @@ struct TemplateInstanceBox
{
bool res = void;
if (ti.inst && s.ti.inst)
{
/* This clause is only used when an instance with errors
* is replaced with a correct instance.
*/
res = ti is s.ti;
}
else
{
/* Used when a proposed instance is used to see if there's
* an existing instance.
*/
res = (cast()s.ti).equalsx(cast()ti);
static if (__VERSION__ >= 2099)
res = (cast()ti).equalsx(cast()s.ti);
else // https://issues.dlang.org/show_bug.cgi?id=22717
res = (cast()s.ti).equalsx(cast()ti);
}

debug (FindExistingInstance) ++(res ? nHits : nCollisions);
return res;
Expand Down