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.
Comment #1 by k.hara.pg — 2013-04-28T18:37:55Z
Comment #2 by github-bugzilla — 2013-05-08T17:45:51Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/04b5b9a7da4b0c3da5f2d9c722ac08725548c361 fix Issue 10002 - calling std.algorithm.remove is impure https://github.com/D-Programming-Language/dmd/commit/75d36600d2f39777470c8b407569e08ead9c08d6 Merge pull request #1945 from 9rnsr/fix10002 [REG2.063a] Issue 10002 - calling std.algorithm.remove is impure