Bug 9987 – Declaring struct ModuleInfo should be allowed
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-04-24T21:28:00Z
Last change time
2013-04-26T00:09:08Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2013-04-24T21:28:42Z
By recent dmd commit 0b5641e, the compiler behavior for declaring a struct named 'ModuleInfo' in user module has changed.
After https://github.com/D-Programming-Language/dmd/commit/0b5641e ,
Code:
struct ModuleInfo {}
void main() {}
Compiles with:
dmd -o- test
Outputs:
Error: struct ModuleInfo only object.d can define this reserved struct name
I think this is unnecessary limitation.