[swift-evolution] [Proposal] Revising access modifiers on extensions

Adrian Zubarev adrian.zubarev at devandartist.com
Mon Jun 27 04:38:43 CDT 2016


I did a mistake in my last reply which I’m correcting here. I meant structs instead of protocols B and C:

internal protocol A { func foo() }

public struct B : A {
      
    // foo won't be visible when imported
    func foo() {}
}

public struct C : A {
      
    // we can grant foo more visibility than it originally had
    // foo will be visible when imported, but the   
    // conformance to `A` will not be visible
    public func foo() {}
}


-- 
Adrian Zubarev
Sent with Airmail

Am 27. Juni 2016 um 10:38:12, Adrian Zubarev (adrian.zubarev at devandartist.com) schrieb:

internal protocol A { func foo() }

public protocol B : A {
      
    // foo won't be visible when imported
    func foo() {}
}

public protocol C : A {
      
    // we can grant foo more visibility than it originally had
    // foo will be visible when imported, but the   
    // conformance to `A` will not be visible
    public func foo() {}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160627/9050c318/attachment.html>


More information about the swift-evolution mailing list