[Issue 13050] New: pragma mangle breaks homonym template aliasing

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jul 5 12:20:19 PDT 2014


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

          Issue ID: 13050
           Summary: pragma mangle breaks homonym template aliasing
           Product: D
           Version: unspecified
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: code at dawg.eu

void foo();
template decl(Arg)
{
    void decl(Arg);
}
template bug(Arg)
{
    pragma(mangle, "foobar")
        void bug(Arg);
}
template workaround(Arg)
{
    pragma(mangle, "foobar")
        void func(Arg);
    alias workaround = func;
}

pragma(msg, typeof(foo));
pragma(msg, typeof(decl!int));
pragma(msg, typeof(bug!int));
pragma(msg, typeof(workaround!int));

----
void()
void(int)
void       // NG - homonym aliasing doesn't work for mangled function
void(int)
----

--


More information about the Digitalmars-d-bugs mailing list