Mixin Templates Over-restricted?

yaz yazan.dabain at gmail.com
Sat May 25 11:04:57 PDT 2013


Is there a reason for restricting mixin templates to only include 
declarations?
For example, the following code doesn't work. 
(http://dpaste.dzfl.pl/1582a25e)
Looking at the language specification 
(http://dlang.org/template-mixin.html) this doesn't seem to be an 
implementation limitation.


import std.stdio;

mixin template Test() {
   writeln("Hello D People!");
}

void main() {
   mixin Test;
}


I would have posted to the main newsgroup but I thought that 
maybe I'm missing something.

Thanks.


More information about the Digitalmars-d-learn mailing list