[Issue 9516] New: Selective imports are always public
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 14 20:51:22 PST 2013
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: nobody at puremagic.com
ReportedBy: jmdavisProg at gmx.com
--- Comment #0 from Jonathan M Davis <jmdavisProg at gmx.com> 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: -------
More information about the Digitalmars-d-bugs
mailing list