[Issue 16633] New: Case where an alias this is tried before the right member
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Oct 21 10:22:56 PDT 2016
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: nobody at puremagic.com
Reporter: b2.temp at gmx.com
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/wcxdarfpfassnjaakklk@forum.dlang.org
--
More information about the Digitalmars-d-bugs
mailing list