D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7496 - Selective imports make module accessible with another import from the same package
Summary: Selective imports make module accessible with another import from the same pa...
Status: RESOLVED DUPLICATE of issue 313
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-13 10:51 UTC by Martin Nowak
Modified: 2012-02-16 19:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Martin Nowak 2012-02-13 10:51:49 UTC
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 Martin Nowak 2012-02-16 19:34:55 UTC

*** This issue has been marked as a duplicate of issue 313 ***