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

           Summary: lazy parameters can break purity
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: timon.g...@gmx.ch


--- Comment #0 from timon.g...@gmx.ch 2011-11-13 04:48:46 PST ---
int foo(lazy int x) pure{
    return x()+x();
}

void main(){
    auto a=foo((writeln("impure"),1));
}

This compiles and prints
impure
impure

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

Reply via email to