[Issue 18698] static foreach + __traits(allMembers, moduleName)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Apr 1 13:28:16 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18698
--- Comment #11 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
module test;
foreach(m; __traits(allMembers, test))
{
pragma(msg, m);
}
rdmd --force --compiler=ldc --eval="pragma(msg, __VERSION__);"
2073L
rdmd --force --compiler=ldc -c test.d
test.d(2): Error: declaration expected, not 'foreach'
test.d(2): Error: declaration expected, not '__traits'
test.d(5): Error: unrecognized declaration
2.073 is *way* before `static foreach`.
so please, code sample and compiler version. if it used to work, and now
doesn't, this is clearly a regression nobody noticed.
the same for old `foreach` code that doesn't work as it used to work before,
please.
--
More information about the Digitalmars-d-bugs
mailing list