[Issue 13814] New: renamed selective alias don't work with eponymous template

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Dec 3 16:28:46 PST 2014


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

          Issue ID: 13814
           Summary: renamed selective alias don't work with eponymous
                    template
           Product: D
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: code at dawg.eu

cat > bug.d << CODE
module bug;

void func(string) {}

template ng()
{
    // renamed selective import isn't a "real" alias
    import bug : ng = func;
}

template ok()
{
    import bug : func;
    // real alias works
    alias ok = func;
}

void test()
{
    ok("works");
    ng("doesn't work");
}
CODE

dmd -c bug
----
bug.d(21): Error: template bug.ng cannot deduce function from argument types
!()(string), candidates are:
bug.d(5):        bug.ng()

--


More information about the Digitalmars-d-bugs mailing list