www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - mixin TemplateIdentifier

template mix() // Line 1.
   int x;
mixin .mix; // Line 5. Note the dot before mix to access module scope.

DMD 0.101 output:
test.d(5): mixin !() mix conflicts with test.mix() at test.d(1)
test.d(5): mixin !() mix test is not a template

If line 5 is changed to:
   mixin .mix!();
The output changes to:
test.d(5): ';' expected after mixin
test.d(5): Declaration expected, not '('

The workaround is to use modulename.mix.
Sep 08 2004