DMD svn and contract inheritance
Stewart Gordon
smjg_1998 at yahoo.com
Thu Oct 1 18:04:18 PDT 2009
Walter Bright wrote:
> Stewart Gordon wrote:
>> Walter Bright wrote:
>> <snip>
>>> There are some tricky bits to doing contract inheritance, I hope gdc
>>> and ldc don't have trouble with it.
>>
>> What tricky bits are those?
>
> It's outlined in the code comments, but it's implemented by making the
> contract code a nested function. The overriding function calls those
> nested functions of the overridden function(s). In order for this to
> work successfully, the 'this' pointer and the stack parameters must wind
> up in the same relative position on the stack.
I'm still none the wiser about why it absolutely has to be done like
this instead of the simpler solution I proposed years ago. But in any
case, thank you for finally getting round to it!
Stewart.
More information about the Digitalmars-d-announce
mailing list