Source code of a method.

QAston qaston at gmail.com
Sun Oct 27 17:21:21 PDT 2013


On Sunday, 27 October 2013 at 14:34:14 UTC, Gary Willoughby wrote:
> Can you provide a simple example please?
Just the same way you generate code for inheritance you can use 
to generate code for composition. You just call 
<membername>.method instead of super.method.

I don't know if anyone can call that a simple example, but it's 
all i have by hand:
https://github.com/QAston/DMocks-revived/blob/master/dmocks/object_mock.d
I use this technique to mock structs and final classes.


More information about the Digitalmars-d-learn mailing list