Bug 9194 – Module imports are not properly checked when found in import path
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-12-22T05:20:00Z
Last change time
2016-10-14T15:49:59Z
Keywords
accepts-invalid
Assigned to
nobody
Creator
andrej.mitrovich
Comments
Comment #0 by andrej.mitrovich — 2012-12-22T05:20:20Z
.\main.d
.\foo.d
main.d:
module main;
import foo;
void main() { test(); }
foo.d:
module bar;
void test() { }
This is OK:
$ dmd -c main.d foo.d
> main.d(2): Error: module bar from file foo.d must be imported as module 'bar'
This should also fail to compile but it doesn't
$ dmd -c main.d
>
Comment #1 by mathias.lang — 2016-10-14T15:49:59Z
According to Walter, this is by design. See the duplicate bug.
*** This issue has been marked as a duplicate of issue 16071 ***