[Issue 18123] New: non-package module accepted for package structure
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 24 22:24:15 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=18123
Issue ID: 18123
Summary: non-package module accepted for package structure
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: luis at luismarques.eu
In the following forum post this issue has come up:
http://forum.dlang.org/post/gnwgqexsifgbvkvmtutk@forum.dlang.org
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.
--
More information about the Digitalmars-d-bugs
mailing list