That is actually very weird because you can override protection attribute with alias for an aggregate: // b.d private struct A_ { } public alias A = A_; // a.d void main() { A a; } // fine! That inconsistency feels plain wrong. Worth enhancement request at least.