Bug 5277 – Member functions that modify its own state wrongfully marked as strongly pure.

Status
RESOLVED
Resolution
DUPLICATE
Severity
blocker
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2010-11-26T09:11:00Z
Last change time
2010-11-26T14:42:08Z
Assigned to
nobody
Creator
ibuclaw

Comments

Comment #0 by ibuclaw — 2010-11-26T09:11:35Z
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
Comment #1 by issues.dlang — 2010-11-26T13:47:19Z
I think that this is a duplicate of bug# 5191. If not, it's certainly related.
Comment #2 by ibuclaw — 2010-11-26T14:39:51Z
I would consider it the same issue. At least, Don's patch in the other report seems to fix it.
Comment #3 by bearophile_hugs — 2010-11-26T14:42:08Z
Then let's close this one as dupe. *** This issue has been marked as a duplicate of issue 5191 ***