Still not what I was asking about. Module A contains a single open protocol: open protocol P { func foo() } Module B contains a single open class that conforms to P: open class B : P { /* what is the default access modifier here? */ func foo() }
-- Adrian Zubarev Sent with Airmail Am 19. Februar 2017 um 17:35:04, Matthew Johnson (matt...@anandabits.com) schrieb: Sent from my iPhone On Feb 19, 2017, at 10:28 AM, Adrian Zubarev <adrian.zuba...@devandartist.com> wrote: I really feel I’m blind, I cannot find it. Is the access modifier of open protocol *members* on open/public classes public by default, or open? If open, can we downgrade it to public in an open class? I didn't specifically address members of open classes but did address open classes. This proposal does not have any impact of the visibility of members of open classes that conform to a public (nonopen) protocol, including the default. -- Adrian Zubarev Sent with Airmail Am 19. Februar 2017 um 17:16:59, Matthew Johnson (matt...@anandabits.com) schrieb: Sent from my iPhone On Feb 19, 2017, at 10:11 AM, Adrian Zubarev <adrian.zuba...@devandartist.com> wrote: @Matthew: Have you considered what happens with the access modifier of an open protocol when an open/public class conforms to it? Yes I covered this in the detailed design section of the proposal. // Module A open protocol A { func foo() } // Module B open class B : A { (open or public) func foo() {} // If `open`, can we downgrade to `public`? // The other way around seems straightforward }
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution