On Thursday, 22 October 2015 at 06:14:34 UTC, DarkRiDDeR wrote:
T[2] addons = [new A(), new B()];
Until pretty recently the compiler was a little picky about the types here so you might have to explicitly cast the first element to the base clas type.
T[2] addons = [cast(T) new A(), new B()];casting just the first element tells it you want them all to be interpreted as the base class.
I believe that is fixed in the newest version.