Hi,
IMHO ArrayList has a bug. Just declaring ArrayList!B bl, raises an error. But maybe I am wrong.. Nevertheless I 've filed a ticket. In case that I switch from class to struct also std.algorithm is involved.

class AListTest {
        alias ArrayList!B BList;
        BList bl;
        this() {}
        
}
class B {
        string _name;
        this(string name) {
                this._name = name;
        }
}

Error 1 Error: cannot implicitly convert expression (this._array[0u]) of type const(B) to main.B D:\dmd2\windows\bin\..\..\src\phobos\dcollections\ArrayList.d 772 Error 2 Error: cannot implicitly convert expression (this._array[__dollar - 1u]) of type const(B) to main.B D:\dmd2\windows\bin\..\..\src\phobos\dcollections\ArrayList.d 780

Reply via email to