[Issue 5277] New: Member functions that modify its own state wrongfully marked as strongly pure.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 26 09:13:01 PST 2010


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

           Summary: Member functions that modify its own state wrongfully
                    marked as strongly pure.
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: ibuclaw at ubuntu.com


--- Comment #0 from Iain Buclaw <ibuclaw at ubuntu.com> 2010-11-26 09:11:35 PST ---
Consider:

struct Foo {
    uint num = 0;

    void incNum() pure nothrow{
        num++;
    }
}


incNum gets marked as PUREstrong, when I feel that it should really be PUREweak
as it clearly has side effects.

Regards

-- 
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