Polymorphism? Passing arguments

Martin martin at mab-on.net
Sat Nov 4 01:52:06 UTC 2017


Thank you for the answer

On Saturday, 4 November 2017 at 01:35:41 UTC, Adam D. Ruppe wrote:
> Why are these ref?
> Just taking ref away from both of those will likely fix your 
> problems.

because without it i get the error "Program exited with code -11"

The thing is, somwhere deeper in `setRelation` i call two 
functions:
```
public void addChild(ref Node child) {
   this.children ~= &child;
}

public void setParent(ref Node parent) {
   this.parent = &parent;
}
```




More information about the Digitalmars-d-learn mailing list