Assertion failure: '!vthis->csym' on line 713 in file 'glue.c
    azurenote 
    azurenote.enseed at gmail.com
       
    Tue Sep  6 20:00:04 PDT 2011
    
    
  
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 :(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20110907/ad04be39/attachment.html>
    
    
More information about the Digitalmars-d-learn
mailing list