Bug 18123 – non-package module accepted for package structure
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-12-24T22:24:15Z
Last change time
2022-06-23T12:44:54Z
Assigned to
No Owner
Creator
Luís Marques
Comments
Comment #0 by luis — 2017-12-24T22:24:15Z
In the following forum post this issue has come up:
http://forum.dlang.org/post/[email protected]
file / module tree:
.
├── foo
│ └── bar.d
└── foo.d
You have a foo package, but instead of having foo/package.d the user added a foo.d file. Because the D frontend didn't detect this issue, the user was confused. I believe that when a package is present, that package should not be implementable as a non-package module (foo.d).
In this case, the compiler should detect that foo.d is present and complain that foo/package.d should be used instead.
Comment #1 by aldacron — 2022-06-23T12:44:54Z
*** This issue has been marked as a duplicate of issue 17699 ***