www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13814] New: renamed selective alias don't work with eponymous

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 puremagic.com
          Reporter: code 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()

--
Dec 03 2014