On Tuesday, 16 September 2014 at 03:05:57 UTC, Franz wrote:
Your issue comme from auto.i is a I[]
I expected i to be an I[], but shouldn't a casting an element of an I[] to a C return either a C or null?
It is if I do this: I[] i = [cast(I) new C, new D]; assert(cast(C) i[0]); // fine Come to think of it, the above will probably work in my situation. But I still wonder why the first example doesn't work.