https://issues.dlang.org/show_bug.cgi?id=16633
Issue ID: 16633
Summary: Case where an alias this is tried before the right
member
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
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]
--