I have a interface `interface Node {...}` and some classes implementing Node: ``` class Text : Node {...} class Element : Node {...} ``` and a function like this: `public void setRelation(ref Node parent , ref Node child) {...}`
if i do this it works: ``` Node root = new Element("root"); Node text = new Text("blah"); setRelation(root , text); ``` but this does not: ``` Node root = new Element("root"); setRelation(root , new Text("blah")); ```
Error: function Nodes.setRelation (ref Node parent, ref Node child) is not callable using argument types (Node, Text)
Why is this? Text implements Node. This is how i do it in other Languages - How can would be this possible in D?