[Issue 16584] Local import ineffective for mixin templates

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Oct 3 15:27:29 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16584

--- Comment #2 from m.bierlee at lostmoment.com ---
For the record: the best solution is to import the needed modules within the
mixin:

mixin template bla(string number) {
    import func;
    uint globalBla = toNumber(number);
}

This keeps within the scope of the mixin body.

--


More information about the Digitalmars-d-bugs mailing list