Cannot implicitly convert derived type
Jesse Phillips
Jesse.K.Phillips+D at gmail.com
Sun Feb 23 15:14:22 PST 2014
On Sunday, 23 February 2014 at 21:06:03 UTC, Frustrated wrote:
>> Why does your WindowsGui violate the iGui contract?
>
> It doesn't. It simply that one can't specify dependencies in D
>
> if (iGui is WindowsGui) then iButton is WindowsButton;
>
> It's not very hard logic but people are not even trying.
I understand what you intend your code to do, but that is still
breaking the contract which you setup. iGui takes an iButton
because you defined it that way, to only handle specific types of
iButton is a breach of contract. The language lets you break
contracts, but it should not help you do so.
More information about the Digitalmars-d-learn
mailing list