> Le 25 févr. 2017 à 02:55, Xiaodi Wu <[email protected]> a écrit : > > It is a useful generalization of an absolutely obligatory feature for new > `private`. Consider the following: > > ``` > private class Foo { > private class Bar { > /* blank */ class Baz { } > } > } > ``` > > What access modifier can be used in place of `blank` to make `Foo.Bar.Baz` > have the same visibility as `Foo.Bar`? Note that `private` inside the type is > more restrictive than `private` in the declaration of the type; the precise > visibility of `Foo.Bar` is not expressible inside `Foo.Bar` itself. To allow > `Foo.Bar.Baz` to be visible everywhere that `Foo.Bar` is visible, we must > allow `blank` to be replaced by a modifier other than `private`.
Aaaarrrgghhh!!! Of course! You'd have thought, having created massive frameworks in C#, which allows the same thing, and which I used extensively, I would have remembered that. It just goes to show that we can often be so close to a subject that we "can't see the wood for the trees" :-) -- Joanna Carter Carter Consulting _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
