Files
swift-mirror/test/SILGen/Inputs/witness_accessibility_other.swift
Slava Pestov a5579d1cff AST: Plug a hole in access control checking
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>.
2018-04-05 23:24:48 -07:00

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 {}