mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
16 lines
209 B
D
16 lines
209 B
D
static foreach(s; ["666", "777", "888"])
|
|
{
|
|
mixin(genCtor(s));
|
|
}
|
|
|
|
int i;
|
|
|
|
string genCtor(string a)
|
|
{
|
|
return "static this() { i += " ~ a ~ "; }";
|
|
}
|
|
|
|
void main()
|
|
{
|
|
assert(i == 0 + 666 + 777 + 888);
|
|
}
|