Bug 15402 – allow private access to package symbols

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-12-04T00:01:00Z
Last change time
2016-04-17T16:07:19Z
Assigned to
nobody
Creator
issues.dlang

Comments

Comment #0 by issues.dlang — 2015-12-04T00:01:32Z
As indicated by issue# 8716 and issue# 15395, at least occasionally, folks use the package attribute on symbols in modules that aren't actually in a package (since they're at the top level of the hierarchy). Given that it makes no sense to use the package attribute on _anything_ in a top-level module, I'd suggest that it be made into an error to do so. Certainly, it makes more sense than allowing an unusable function to be declared and then make it an error to use it, which is the current behavior.
Comment #1 by code — 2016-04-09T16:17:06Z
Package is a superset of private, so it should allow the same access.
Comment #2 by github-bugzilla — 2016-04-09T16:37:46Z
Comment #3 by petar.p.kirov — 2016-04-09T17:06:42Z
I'm reopening because the commit was not actually pushed to master or stable.
Comment #4 by github-bugzilla — 2016-04-10T17:34:57Z
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c424690156a6f2b4f402415c45e780833f2f2df2 fix Issue 15402 - allow private access to package symbols https://github.com/D-Programming-Language/dmd/commit/e36364035fb1cd689df86f599f8473e1bef10ab5 Merge pull request #5642 from D-Programming-Language/fix15402 fix Issue 15402 - allow private access to package symbols
Comment #5 by dfj1esp02 — 2016-04-11T09:41:00Z
*** Issue 8716 has been marked as a duplicate of this issue. ***
Comment #6 by github-bugzilla — 2016-04-17T16:07:19Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/c424690156a6f2b4f402415c45e780833f2f2df2 fix Issue 15402 - allow private access to package symbols https://github.com/dlang/dmd/commit/e36364035fb1cd689df86f599f8473e1bef10ab5 Merge pull request #5642 from D-Programming-Language/fix15402