[Issue 16025] mixin myTemplate should throw an error

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat May 14 12:10:05 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16025

ag0aep6g at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ag0aep6g at gmail.com

--- Comment #1 from ag0aep6g at gmail.com ---
Please provide a full test case. As it is, your code fails because myTemplate
isn't defined.

When I add `template myTemplate() {}`, then it compiles. That's expected.

You may be mixing up template mixins with string mixins. `mixin myTemplate;` is
a template mixin. `mixin(myTemplate)` is a string mixin. They do different
things.

--


More information about the Digitalmars-d-bugs mailing list