Bug 13709 – Can access symbols that are not publicly imported via full name

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2014-11-11T06:38:00Z
Last change time
2016-03-31T06:24:08Z
Assigned to
nobody
Creator
maximzms

Comments

Comment #0 by maximzms — 2014-11-11T06:38:37Z
DMD version: 2.066.1 In the example below `main.d` can't call functions from `std.stdio` since the import in `foo.d` is not public. However there is access to the functions by full name (e.g. `std.stdio.write`). ----- foo.d ----- module foo; import std.stdio; // There is no public import ----------------- ----- main.d ---- import foo; void main() { // write("hello"); // <--- Error std.stdio.write("hello"); // <--- Works } -----------------
Comment #1 by maximzms — 2016-03-31T06:24:08Z
*** This issue has been marked as a duplicate of issue 313 ***