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.
Comment #1 by k.hara.pg — 2013-04-24T21:53:45Z
Comment #2 by github-bugzilla — 2013-04-25T09:14:19Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6dcb46b35c0a845ca13e967875ba2d04473c407f fix Issue 9987 - Declaring struct ModuleInfo should be allowed https://github.com/D-Programming-Language/dmd/commit/cb7b1f5c2a237eaefd0622da6072a59e11cfb42e Merge pull request #1932 from 9rnsr/fix9987 Issue 9987 - Declaring struct ModuleInfo should be allowed