[swift-evolution] [Discussion] A Problem With SE-0025?
jordan_rose at apple.com
Thu Jun 30 15:16:53 CDT 2016
> On Jun 30, 2016, at 9:48, Xiaodi Wu <xiaodi.wu at gmail.com> wrote:
> Cool. FWIW, even in such a world, I wonder if the conformance needs to be regarded as `fileprivate`:
> In all cases where a private protocol is visible and conformance can be declared, the protocol's access level would be--
> - effectively fileprivate (if both protocol and conformance are declared top-level)
> - and/or private (if both protocol and conformance are declared in the same scope)
> - or unutterably less than fileprivate but more than private (if the protocol is not declared top-level and the conformance is declared in a nested scope).
> In that last case, private is a less accessible level and all other modifiers are more accessible, so the hypothetical feature of declaring conformance with less access remains usable even if the default unutterable access level stays unutterable.
Ah, this is probably true. The conformance always has access less than or equal to the type and less than or equal to the protocol, and you have to be able to see both the type and the protocol to do anything static with it anyway. I guess we're good without it.
More information about the swift-evolution