[Issue 19674] multiple local template function with same name don't work

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 13 19:23:21 UTC 2019


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

Iain Buclaw <ibuclaw at gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw at gdcproject.org

--- Comment #2 from Iain Buclaw <ibuclaw at gdcproject.org> ---
A frame gets created in main() with both 'a' vars as fields.

(gdb) pt this
type = struct FRAME.D main {
    int [] a;
    int [] a;
} * const

(gdb) p *this
$1 = {a = {3, 3}, a = 0x0}


However, looks like only one add() is sent to the code generation phase to be
emitted.

In this case, the first add(), which only appends to the first field in the
frame.

Two functions should be generated, though need to avoid the pitfall of
conflicting symbols.

--


More information about the Digitalmars-d-bugs mailing list