Bug 12986 – keywords allowed in module names if no ModuleDeclaration is used
Status
RESOLVED
Resolution
WONTFIX
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-06-24T21:36:03Z
Last change time
2022-08-25T11:07:43Z
Assigned to
No Owner
Creator
sigod
Comments
Comment #0 by sigod.mail — 2014-06-24T21:36:03Z
Related to: https://issues.dlang.org/show_bug.cgi?id=456
I opened new issue because old one was about D1.
I suggest that:
1. Or keywords must be disallowed for module names completely.
2. Or documentation must be modified to explain "hidden" feature. Actually currently it speaks only about package names.
In issue 456 was said that this change will break some of phobos' modules. Now as I see it will only break `unittest.d`.
Comment #1 by razvan.nitu1305 — 2022-08-25T11:07:43Z
Yes, the problem is that the parser expects an identifier not a keyword after the the `module` token. This is a minor limitation and as Walter has pointed out:
"I think that 'fixing' this is probably more trouble than its worth. While such modules do work for internal modules that have no D interface, they won't work anyway for regular D modules, and the user will find that out pretty quick."
Closing as WONTFIX.