mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This gets adjustAccessLevelForProtocolExtension, a hack of sorts to begin with, out of ValueDecl's general API, and down to a helper for isAccessibleFrom and isSetterAccessibleFrom. (The only reason these two don't go through access scopes is as an optimization.)
31 lines
751 B
Swift
31 lines
751 B
Swift
public struct PrivateConformance : PrivateProtocol, FilePrivateProtocol {}
|
|
|
|
private protocol PrivateProtocol {}
|
|
|
|
extension PrivateProtocol {
|
|
public func publicExtensionMember() {}
|
|
|
|
internal func internalExtensionMember() {}
|
|
}
|
|
|
|
fileprivate protocol FilePrivateProtocol {}
|
|
|
|
extension FilePrivateProtocol {
|
|
public func publicFPExtensionMember() {}
|
|
// expected-note@-1 {{'publicFPExtensionMember' declared here}}
|
|
|
|
internal func internalFPExtensionMember() {}
|
|
// expected-note@-1 {{'internalFPExtensionMember' declared here}}
|
|
}
|
|
|
|
|
|
public struct InternalConformance : InternalProtocol {}
|
|
|
|
internal protocol InternalProtocol {}
|
|
|
|
extension InternalProtocol {
|
|
public func publicExtensionMember() {}
|
|
|
|
internal func internalExtensionMember() {}
|
|
}
|