[Issue 15896] New: private ignored when import bindings are used
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Apr 8 02:06:41 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=15896
Issue ID: 15896
Summary: private ignored when import bindings are used
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: major
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: atila.neves at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list