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

--- Comment #0 from Kenji Hara <> 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
void main()
    auto n = purefunc();

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to