On Thursday, 21 November 2013 at 06:31:54 UTC, RomulT wrote:
Yes, it a work, thank you. The problem occurs when, in Variant
already recorded XXX[] and it is necessary to extract the
IXXX[], because in the place used nothing is known about type
XXX.
so you need just to cast XXX[] to IXXX[] ? AFAIK arrays can't be
casted to other types. but you can use std.conv.to to convert it.
writeln( std.conv.to!(IXXX[])(v.get!(XXX[])) );
but if you put another class derived from IXXX you can see they
are still initial types, not IXXX as you may expect.