Array of interfaces static initialization
Yossarian
xtauer01 at stud.fit.vutbr.cz
Fri Apr 18 11:19:14 PDT 2008
Hello.
I've got following array:
typedef iObject[] paramList;
and following object architecture:
abstract class iObject { ... };
class associativeArray : iObject { ... };
class block : iObject { ... };
class cIrc : block { ... };
class command : associativeArray { ... };
and have function
Run(paramList);
..
when I use (z.B.)
command c;
cIrc this;
Run([c, this]);
irc.d(278): Error: cannot implicitly convert expression (this) of type
ghhd.irc.
cIrc to ghhd.irc.command
both command and irc could be easily upcast to iObject,
so I think that this is absolutely legal usage (bug ?), or I've badly
understood the array initializer?
TIA
-- Yossarian
Tato zpráva byla vytvořena převratným poštovním klientem Opery:
http://www.opera.com/mail/
More information about the Digitalmars-d
mailing list