Bug 9516 – Selective imports are always public

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-02-14T20:51:00Z
Last change time
2013-02-15T08:20:36Z
Assigned to
nobody
Creator
issues.dlang

Comments

Comment #0 by issues.dlang — 2013-02-14T20:51:21Z
Take this module ----------- module q; import w; void main() { find("hello", 'c'); } ----------- and this module ----------- module w; import std.algorithm : find; ----------- The code compiles just fine, even though q never imported find. Compilation should have failed. The fact that it succeeded implies that selective imports are always being treated as public. And explicitly marking the import as private has no effect.
Comment #1 by andrej.mitrovich — 2013-02-15T08:20:36Z
*** This issue has been marked as a duplicate of issue 314 ***