Making external types available to mixins

Adam D. Ruppe destructionator at gmail.com
Sat Nov 17 21:11:38 UTC 2018


On Saturday, 17 November 2018 at 17:58:54 UTC, John Chapman wrote:
> Has anyone had a similar need and come up with a solution?

You might be able to just pass it the Calendar type, and then 
fetch its parent module and get the ICalendarFactory from there 
(assuming they are defined in the same module).

But generally speaking, passing strings to a mixin that refer to 
something in another module isn't going to work well thanks to 
scoping rules. You are better off passing a symbol of some sort.


More information about the Digitalmars-d-learn mailing list