DMD svn and contract inheritance

Walter Bright newshound1 at digitalmars.com
Thu Oct 1 10:45:21 PDT 2009


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.


More information about the Digitalmars-d-announce mailing list