http://d.puremagic.com/issues/show_bug.cgi?id=7856
Summary: static import-ed module behaves as symbol it contents
Product: D
Version: D2
Platform: x86_64
OS/Version: Mac OS X
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Alex <[email protected]> 2012-04-08 04:16:55 PDT
---
In case there is symbol in module that has the same name as module itself, it
will be substituted for module when doing static import regardless of
protection level.
Example:
=== mod.d:
module mod;
private {
version(foo) union mod {};
version(bar) struct mod {};
version(baz) class mod {};
version(quux) alias int mod;
}
=== modmain.d:
module modmain;
import std.stdio;
static import mod;
void main() {
writeln(typeid(mod));
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------