Bug 10002 – 2.062 -> 2.063 calling "remove" is impure
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-04-28T14:50:00Z
Last change time
2013-05-08T20:48:33Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
henning
Comments
Comment #0 by henning — 2013-04-28T14:50:14Z
import std.algorithm;
class Node {
Node parent;
Node[] children;
void foo() pure {
parent.children.remove!(n => n is parent)();
}
}
2.063:
-----
main.d(8): Error: pure function 'foo' cannot call impure function 'remove'
-----
Note: Moving "parent" into "foo" will make 2.062 reject it, too.