[Issue 12410] New: non-parametrized helper function in eponymous template is not inferred

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 19 01:36:32 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12410

           Summary: non-parametrized helper function in eponymous template
                    is not inferred
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: monarchdodra at gmail.com


--- Comment #0 from monarchdodra at gmail.com 2014-03-19 01:36:26 PDT ---
Given:
- An eponymous template
- A non-parametrized function
- That is not eponymous

=> inference is not triggered

//----
template sift1(T)
{
    void sift1() //Infered
    {}
}
template sift2(T)
{
    void siftImpl() //*NOT* infered
    {}

    void sift2() //Infered
    {
        siftImpl();
    }
}

void main() @safe pure nothrow
{
    sift1!int(); //OK!
    sift2!int(); //FAILS!
}
//----

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


More information about the Digitalmars-d-bugs mailing list