D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 9987 - Declaring struct ModuleInfo should be allowed
Summary: Declaring struct ModuleInfo should be allowed
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 regression
Assignee: No Owner
URL:
Keywords: pull, rejects-valid
Depends on:
Blocks:
 
Reported: 2013-04-24 21:28 UTC by Kenji Hara
Modified: 2013-04-26 00:09 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kenji Hara 2013-04-24 21:28:42 UTC
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 2 github-bugzilla 2013-04-25 09:14:19 UTC
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