Implicit conversion to base interface doesn't work inside initialization of AA of objects
Uranuz via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jul 17 10:25:40 PDT 2014
On Thursday, 17 July 2014 at 17:15:54 UTC, bearophile wrote:
>> interface IBase {}
>> class Impl(T): IBase {
>> T value;
>> }
>> void main() {
>> IBase a = true ? (new Impl!uint) : (new Impl!string);
>> }
>
> I have added a note:
> https://issues.dlang.org/show_bug.cgi?id=3543
>
> Bye,
> bearophile
OK. Thanks. Using casts everywhere for such case us quite
annoying. I've tested it for plain array it doesn't work too.
However issue is marked as solved for it.
More information about the Digitalmars-d
mailing list