Order of interface implementations affects code
Stewart Gordon
smjg_1998 at yahoo.com
Thu Oct 14 14:16:03 PDT 2010
On 14/10/2010 18:14, Andrej Mitrovic wrote:
> Should the order in which you implement interfaces have an effect in
> your code?
No.
> It seems to be that way when you have two functions with
> thesame name in the different interfaces.
<snip>
If they are normal interface functions, then if they have the same
signature then they should resolve to the same function in any class
that implements both. If they have the same parameters but different
return types, or are final functions with the same signature, the
compiler should reject any class that implements both.
If one's final and the other isn't ... I guess I just don't know what's
meant to happen.
Stewart.
More information about the Digitalmars-d-learn
mailing list