April 08, 2012 [Issue 7856] New: static import-ed module behaves as symbol it contents | ||||
---|---|---|---|---|
| ||||
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: nobody@puremagic.com ReportedBy: malicious.wizard@gmail.com --- Comment #0 from Alex <malicious.wizard@gmail.com> 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: ------- |
Copyright © 1999-2021 by the D Language Foundation