Bug? somearrayofclassinstances.filter(...).array fails because of .init() method in class

2016-07-15 Thread dom via Digitalmars-d-learn
i just had a scenario like the one below. when calling .array on the filterresult dmd goes nuts because of the init() function in Players. Renaming to initialize() solved the problem. Solution: As .init is used for struct initialization and such (https://dlang.org/spec/property.html#init) i th

Re: Bug? somearrayofclassinstances.filter(...).array fails because of .init() method in class

2016-07-15 Thread ag0aep6g via Digitalmars-d-learn
On 07/15/2016 12:54 PM, dom wrote: i just had a scenario like the one below. when calling .array on the filterresult dmd goes nuts because of the init() function in Players. Renaming to initialize() solved the problem. Solution: As .init is used for struct initialization and such (https://dlang.

Re: Bug? somearrayofclassinstances.filter(...).array fails because of .init() method in class

2016-07-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/15/16 7:44 AM, ag0aep6g wrote: On 07/15/2016 12:54 PM, dom wrote: i just had a scenario like the one below. when calling .array on the filterresult dmd goes nuts because of the init() function in Players. Renaming to initialize() solved the problem. Solution: As .init is used for struct in