D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15283 - `protected` doesn't work for static members
Summary: `protected` doesn't work for static members
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-04 11:03 UTC by Dicebot
Modified: 2020-03-02 16:45 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Dicebot 2015-11-04 11:03:38 UTC
```b.d
class B { protected static int x = 42; }
```

```a.d
import b;
class A { static int x = super.x; }
```

Error: class b.B member x is not accessible
Comment 1 Dicebot 2015-11-04 11:33:12 UTC
oops, it should be `class A : B` of course
Comment 2 Mathias LANG 2020-03-02 16:45:56 UTC
This works now, probably since the time the access code was removed (a few releases ago).