D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 16556 - Named imports violate privacy
Summary: Named imports violate privacy
Status: RESOLVED DUPLICATE of issue 15896
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-27 21:01 UTC by Eyal
Modified: 2016-09-27 21:12 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Eyal 2016-09-27 21:01:59 UTC
Private qualifier is ignored on explicit imported names.

module a;

private int x;



module b;

import a : x; // If you remove ": x" suffix, it will not compile.

void main() {
  x += 1; // <-- compiles
}
Comment 1 ag0aep6g 2016-09-27 21:12:09 UTC

*** This issue has been marked as a duplicate of issue 15896 ***