digitalmars.D.learn - Assertion failure: '!vthis->csym' on line 713 in file 'glue.c
- azurenote (40/40) Sep 06 2011 charset="US-ASCII"
charset="US-ASCII" Content-Transfer-Encoding: 7bit Hi there, please look at this. This code occur "Assertion failure: '!vthis->csym' on line 713 in file 'glue.c": import std.algorithm; class Node { Node _parent; Node[] _children; this() { } void addChild(Node child) { _children ~= child; } void removeChild(Node child) { _children = remove!( (i){return i == child;} )(_children); // This line crashes! } property: Node parent() {return _parent;} void parent(Node node) {_parent = node;} Node[] children() {return _children;} } I cannot understand error message.. What is the problem? Or how can I fix it? ps> There are not enough examples for std.container :(
Sep 06 2011