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

           Summary: Template function that has lazy parameter does not
                    inferred as pure
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: k.hara...@gmail.com


--- Comment #0 from Kenji Hara <k.hara...@gmail.com> 2011-09-16 14:17:37 PDT ---
By fixing bug 5750, the calcLazy should be inferred as pure, but it doesn't.

T calcLazy(T)(lazy T n)
{
    return n;
}
int purefunc() pure
{
    return calcLazy(1);
    // test.d(8): Error: pure function 'purefunc' cannot call impure function
'calcLazy'
}
void main()
{
    auto n = purefunc();
}

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

Reply via email to