[Issue 7023] New: alias to overload set in template doesn't work

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 27 16:26:30 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=7023

           Summary: alias to overload set in template doesn't work
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: mrmocool at gmx.de


--- Comment #0 from Trass3r <mrmocool at gmx.de> 2011-11-27 16:25:27 PST ---
template One(T)
{
    alias _One!T.foo One;
}

template _One(T)
{
    void foo(int i)    {}
    void foo(long l) {}
}

void main()
{
    long i = 5;
    One!float(555555555555555555L);
}

Error: cannot implicitly convert expression (555555555555555555L) of type long
to int

i.e. it doesn't recognize the second foo at all.
bug or feature?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list