[Issue 17352] [REG 2.075a] Internal error: ddmd/backend/elfobj.c 1739 on duplicate definition

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jun 28 18:25:31 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17352

--- Comment #6 from Martin Nowak <code at dawg.eu> ---
cat > bug.d << CODE
void bug(Args...)()
{
}

void test(bool coin)
{
    if (coin)
    {
        string foobar;
        bug!foobar();
    }
    else
    {
        string foobar;
        bug!foobar();
    }
}
CODE
----
dmd -c bug.d
----
Internal error: ddmd/backend/elfobj.c 1739
----

This is a real instance of this bug caused by ambiguous mangling of local
variables (see issue 14831).

Interestingly enough `void bug(alias var)()` only outputs a single template
instance :o.

--


More information about the Digitalmars-d-bugs mailing list