DDoc ignores mixins

Gor Gyolchanyan gor.f.gyolchanyan at gmail.com
Sun May 6 05:36:46 PDT 2012


Thanks for the links. voted both up.
My real case is, of course, much more complicated. I'm making a struct
template, which takes a callable type and an index and mixin-generates
an appropriate constructor, accessor and an attribute to store a
parameter of that callable under that index, while retaining the
storage class (ref and out are stored by pointer, lazy - by delegate).
And I have 3 mixins inside the template struct: one for the
constructor, one for the accessor and one for the attribute.

On Sun, May 6, 2012 at 4:30 PM, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> On Sunday, May 06, 2012 16:17:06 Gor Gyolchanyan wrote:
>> Is it supposed to be like this?
>>
>> /// Generates docs for the constructor
>> struct A
>> {
>>     ///
>>     this(int i) { }
>> }
>>
>> /// Does not generate docs for the constructor
>> Struct B
>> {
>>     ///
>>     mixin("this(int i) { }");
>> }
>
> That's how it currently works. I suspect that this particular case was never
> even considered when ddoc was created, but I don't know. Regardless, I believe
> that it would be an enhancement for it to work otherwise. It certainly would
> solve some problems though, so it should probably happen. I can find two
> related issues:
>
> http://d.puremagic.com/issues/show_bug.cgi?id=648
> http://d.puremagic.com/issues/show_bug.cgi?id=2420
>
> - Jonathan M Davis



-- 
Bye,
Gor Gyolchanyan.


More information about the Digitalmars-d mailing list