DDoc and mixins

Gerald Stocker gobstocker at gmail.com
Sun May 6 18:39:35 PDT 2007


Kirk McDonald wrote:
> Gerald Stocker wrote:
>> Hello,
>>
>> Is there any way to attach a documentation comment to declarations 
>> that are generated by mixins? Neither of the following work:
>>
>> /// Documentation for foo.
>> mixin("int foo;");
>>
>> mixin("int foo; /// Documentation for foo.");
>>
> 
> The doc-comment needs to come immediately /before/ the delcaration. Have 
> you tried:
> 
> mixin("/** Documentation for foo. */ int foo;");
> 

Nope, that doesn't work either. I wonder if I should report this as a bug?

(Also, doc comments to the right of a declaration are OK according to 
the D language spec.

	int foo; /// Documentation for foo.

works fine if it is not a mixin but just typed directly in the source.)

--Gerald.



More information about the Digitalmars-d mailing list