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
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/ffcc380b9c06785b32c9db4eb2d392d89dcc661c Fix Issue 15896 - private ignored when import bindings are used https://github.com/dlang/dmd/commit/7d934731c124d70afaf7f795db039a6a887b46fd Merge pull request #6660 from RazvanN7/Issue_15896 Fix Issue 15896 - private ignored when import bindings are used merged-on-behalf-of: Andrei Alexandrescu <[email protected]>
Comment #3 by github-bugzilla — 2017-04-03T19:45:35Z
Commit pushed to revert-6660-Issue_15896 at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/423c52204b45e5e01f17c106d1f254cdaa6c7a50 Revert "Fix Issue 15896 - private ignored when import bindings are used"
Comment #4 by github-bugzilla — 2017-04-03T20:27:11Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/423c52204b45e5e01f17c106d1f254cdaa6c7a50 Revert "Fix Issue 15896 - private ignored when import bindings are used" https://github.com/dlang/dmd/commit/8d0fce421b1b55921c9827ac1d89633560a3c0a7 Merge pull request #6673 from dlang/revert-6660-Issue_15896 Revert "Fix Issue 15896 - private ignored when import bindings are used" merged-on-behalf-of: Vladimir Panteleev <[email protected]>
Comment #5 by github-bugzilla — 2017-06-17T11:33:50Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/ffcc380b9c06785b32c9db4eb2d392d89dcc661c Fix Issue 15896 - private ignored when import bindings are used https://github.com/dlang/dmd/commit/7d934731c124d70afaf7f795db039a6a887b46fd Merge pull request #6660 from RazvanN7/Issue_15896 https://github.com/dlang/dmd/commit/423c52204b45e5e01f17c106d1f254cdaa6c7a50 Revert "Fix Issue 15896 - private ignored when import bindings are used" https://github.com/dlang/dmd/commit/8d0fce421b1b55921c9827ac1d89633560a3c0a7 Merge pull request #6673 from dlang/revert-6660-Issue_15896
Comment #6 by github-bugzilla — 2017-08-07T13:15:40Z
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/ffcc380b9c06785b32c9db4eb2d392d89dcc661c Fix Issue 15896 - private ignored when import bindings are used https://github.com/dlang/dmd/commit/7d934731c124d70afaf7f795db039a6a887b46fd Merge pull request #6660 from RazvanN7/Issue_15896 https://github.com/dlang/dmd/commit/423c52204b45e5e01f17c106d1f254cdaa6c7a50 Revert "Fix Issue 15896 - private ignored when import bindings are used" https://github.com/dlang/dmd/commit/8d0fce421b1b55921c9827ac1d89633560a3c0a7 Merge pull request #6673 from dlang/revert-6660-Issue_15896