September 08, 2004 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. |
Copyright © 1999-2021 by the D Language Foundation