mixin(__MODULE__) fails if module name is "module"
sigod via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jun 22 05:52:09 PDT 2014
E.g.:
module.d: (or just `module module;` in source file)
```
import std.stdio;
void main() {
foreach (m; __traits(allMembers, mixin(__MODULE__))) { //
module.d-mixin-4(4): Error: expression expected, not 'module'
writeln(m);
}
}
```
Documentation says:
> Package names cannot be keywords, hence the corresponding
> directory names cannot be keywords, either.
Shouldn't keywords be disallowed for module names?
More information about the Digitalmars-d-learn
mailing list