Bug 12996 – SList: linearRemove cannot remove root node

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-06-26T19:29:00Z
Last change time
2014-06-28T19:51:58Z
Keywords
pull
Assigned to
nobody
Creator
sigod.mail

Comments

Comment #0 by sigod.mail — 2014-06-26T19:29:22Z
This works: ``` auto s = SList!int(1, 2, 3, 4, 5); auto r = s[]; popFrontN(r, 1); auto r1 = s.linearRemove(r); // works ``` and ``` auto s = SList!int(1, 2, 3, 4, 5); auto r = s[]; auto r1 = s.linearRemove(r.take(5)); // works ``` And this not: ``` auto s = SList!int(1, 2, 3, 4, 5); auto r = s[]; auto r1 = s.linearRemove(r); // exception ```
Comment #1 by sigod.mail — 2014-06-26T19:57:14Z
Comment #2 by github-bugzilla — 2014-06-28T19:51:58Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/deb84d53ec799a57931c7e8da039938a5dbd142a Fix Issue 12996 - SList: linearRemove cannot remove root node https://github.com/D-Programming-Language/phobos/commit/433fdd4f346cb326f692071c987b28361624d008 Merge pull request #2271 from sigod/issue_12996 Fix Issue 12996 - SList: linearRemove cannot remove root node