class Item
{
alias children this;
Item[] children;
void populate()
{
children ~= new Item; // Item is seen as []
assert(children.length == 1);
}
}
void main()
{
Item root = new Item;
root.populate;
}
https://forum.dlang.org/thread/[email protected]
Comment #1 by schveiguy — 2016-10-21T19:30:07Z
I think the summary was incorrect, please revert if I was wrong.
Comment #2 by razvan.nitu1305 — 2018-10-19T11:31:39Z