[Issue 20494] Appending derived class array to an interface array.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 13 19:52:34 UTC 2020


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

Nate <ng069976 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ng069976 at gmail.com

--- Comment #3 from Nate <ng069976 at gmail.com> ---
Attempt 1   this should work, but it doesn't:
Foo[] x= new Foo[0];
Bar[] y= [ new Bar() ];
x ~= y;
x ~= [y[0]];   //   This should also work.  

Attempt 3   this shouldn't work, but some how it does:
Foo[] x= new Foo[0];
Bar[] y= [ new Bar() ];
x ~= y[0];

--


More information about the Digitalmars-d-bugs mailing list