Hi,

I try to initialize an array of objects. The methods (linear/equals/....) returns object of different classes, but all implement a common interface "Element".

Element[] elements = quadraticCoefficient(1)~linearCoefficient(2)~equals()~constant(1);

I tried different casts and different ways but it seems, currently D does not support this syntax? I always get some strange error like: Incompatible types for .... object.Object and object.Object.

Is there any nice way to initialize an array of objects without much syntax overhead?

Kind regards
André


Reply via email to