[Issue 2010] Template tuples don't work in string mixins
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 18 16:08:14 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2010
------- Comment #1 from bartosz at relisoft.com 2008-04-18 18:08 -------
The order of declarations seems to matter, so here's the modified example and
the error message:
string declareAllFeaturesArr (string [] allFeatures)
{
return "int x;";
}
string declareAllFeatures (T...)(T features)
{
string [] arr = [];
foreach (f; features)
{
arr ~= f;
}
return declareAllFeaturesArr (arr);
}
mixin (declareAllFeatures ("a", "b", "c"));
Error: cannot evaluate declareAllFeatures(&"a",&"b",&"c") at compile time
--
More information about the Digitalmars-d-bugs
mailing list