http://d.puremagic.com/issues/show_bug.cgi?id=9516
Summary: Selective imports are always public
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Jonathan M Davis <[email protected]> 2013-02-14 20:51:21
PST ---
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.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------