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.
*** Issue 16556 has been marked as a duplicate of this issue. ***
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 <andralex@users.noreply.github.com>
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"
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 <github@thecybershadow.net>
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
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