mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
A protocol extension of a private protocol can define internal or public members. We should not be able to find these members from another file or module if an internal or public type conforms to the protocol. Fixes <rdar://problem/21380336>.
21 lines
281 B
Swift
21 lines
281 B
Swift
public protocol P {
|
|
func publicRequirement()
|
|
}
|
|
|
|
@usableFromInline
|
|
protocol Q : P {
|
|
func internalRequirement()
|
|
}
|
|
|
|
fileprivate protocol R : Q {}
|
|
|
|
extension R {
|
|
public func publicRequirement() {}
|
|
}
|
|
|
|
extension Q {
|
|
public func internalRequirement() {}
|
|
}
|
|
|
|
public struct S : R {}
|