I've marked this as a regression because the docs [1] say:
"protected module members are illegal."
However, the compiler not complain about protected module members:
```
module a;
// This compiles
protected int wrong;
```
```
module b;
import std.stdio;
import a;
int main() { writeln(wrong); }
```
Instead, it gives the deprecation message about visibility:
"Deprecation: a.wrong is not visible from module b"
With -d, it compiles and runs.
[1] https://dlang.org/spec/attribute.html#visibility_attributes
Comment #1 by razvan.nitu1305 — 2018-10-31T13:52:49Z
If an issue is marked as an regression it has to state which is the last compiler version that implemented the feature correctly. Downgrading to normal
Comment #2 by pro.mathias.lang — 2020-03-02T16:50:10Z
I'm all for changing the docs and treating `protected` at module scope as `private`.
It's more permissive, but I doubt it'll surprise anyone.
Comment #3 by robert.schadek — 2024-12-13T19:01:06Z