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

Walter Bright <bugzi...@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzi...@digitalmars.com

--- Comment #3 from Walter Bright <bugzi...@digitalmars.com> ---
Even smaller test case report from Mathias Lang:

void main()
{
    {
        void set()(int i) { assert(i); }
        set(1);
    }
    {
        void set()(int i) {}
        set(0);
    }
}

You probably know what's going to happen: the assert would be triggered. The FE
would behave correctly, but backend will mangle the two functions the same way,
leading to the first instance of "set" replacing the second one, and a nice
linker message (Linux x86_64):
/usr/bin/ld: Warning: size of symbol
`_D9a_bug97484mainFZ8__T3setZ3setMFNaNbNiNfiZv' changed from 29 in a_bug9748.o
to 10 in a_bug9748.o

--

Reply via email to