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