www.digitalmars.com         C & C++   DMDScript  

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


          Issue ID: 13814
           Summary: renamed selective alias don't work with eponymous
           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()
    ng("doesn't work");

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