Debian Codegraph @

gcc/testsuite/gdc.test/runnable/test18868_3.d

raw
1 static foreach(s; ["666", "777", "888"])
2 {
3 mixin(genCtor(s));
4 }
5
6 int i;
7
8 string genCtor(string a)
9 {
10 return "static this() { i += " ~ a ~ "; }";
11 }
12
13 void main()
14 {
15 assert(i == 0 + 666 + 777 + 888);
16 }