Bug 15896 – private ignored when import bindings are used
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-04-08T09:06:00Z
Last change time
2017-08-07T13:15:40Z
Assigned to
nobody
Creator
atila.neves
Comments
Comment #0 by atila.neves — 2016-04-08T09:06:41Z
foo.d:
import bar;
int func() { thebar + 1; }
bar.d:
private int thebar = 4;
Compilation fails as expected since `thebar` is private. But change the import in foo.d to:
import bar: thebar;
And suddenly thebar isn't so private anymore.
Comment #1 by ag0aep6g — 2016-09-27T21:12:09Z
*** Issue 16556 has been marked as a duplicate of this issue. ***
Comment #2 by github-bugzilla — 2017-04-03T19:03:45Z