> On Feb 21, 2017, at 7:14 PM, Robert Widmann <[email protected]> wrote:
> 
> Fileprivate and private are not changing at all.  Their meaning now extends 
> from “private to this file” and “private to this declaration” respectively to 
> those meanings plus “unexportable across any module boundary”.  One 
> implication of this is it is now possible to create module-scoped private 
> constants, functions, and data structures, which is one of the use-cases that 
> Daniel Duan mentioned earlier down in the thread.

So what you are saying is that, in my example:

        // foo.swift
        import MyMod.Submodule
        func foo() {
                bar()
        }

        // bar.swift
        module Submodule {
                internal func bar() {
                        baz()
                }
        }

        // baz.swift
        extension Submodule {           
                ??? func baz() {
                        …
                }
        }

There is nothing I can put in the `???` slot that will expose `baz()` to 
`bar()`, but not to `foo()`. Correct?

-- 
Brent Royal-Gordon
Architechies

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to