Template mixin problem

Bill Baxter wbaxter at gmail.com
Mon Dec 15 00:53:37 PST 2008


On Mon, Dec 15, 2008 at 5:48 PM, Olli Aalto <oaalto at gmail.com> wrote:
> Ok, downs figured it out on #D. You can't have mixins in templates, which is
> a big disappointment.
>
> Removing the HelloData mixin from HelloSpeaker and all references to
> helloStr it "works".

Hmm, didn't know that.  But also if you import a module that uses a
mixin, the module that uses the mixin also needs to import the mixin
module.  I'm sure that didn't make any sense.

I.e. you may need to import mixins.HelloData in mixins.HelloWorld.
And maybe import all the mixin modules in in main.

--bb


More information about the Digitalmars-d-learn mailing list