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

ag0aep6g via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jul 15 04:44:55 PDT 2016


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.org/spec/property.html#init) i think it should be a
> restricted keyword for class members and methods

Known issue.

https://issues.dlang.org/show_bug.cgi?id=14237
https://issues.dlang.org/show_bug.cgi?id=7066

Of course, being known doesn't mean that anyone is actively working on a 
fix. Feel free to make (a little) noise on Bugzilla, or in the General 
group.


More information about the Digitalmars-d-learn mailing list