Bug 7496 – Selective imports make module accessible with another import from the same package

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-13T10:51:00Z
Last change time
2012-02-16T19:34:55Z
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2012-02-13T10:51:49Z
import std.algorithm; import std.stdio : writeln; void bar() { std.stdio.writeln(); } ---- Without importing std.algorithm this will fail. This is because std.algorithm make the std package available which in turn 'knows' stdio because of the selective import. There are two solutions. Either disallowing std.stdio or making std.stdio available for selective imports too.
Comment #1 by code — 2012-02-16T19:34:55Z
*** This issue has been marked as a duplicate of issue 313 ***