How can I achieve something like this (doesn\'t compile):
internal protocol InternalPrivateMix {
private func doPrivately()
internal func doInternaly
You can do this:
protocol P {
func int()
}
extension P {
func int() {
print("int()")
priv()
}
private func priv() {
print("priv()")
}
}
Which might serve your purpose - I use it.
From Apple's docs it looks like the only way to achieve what you are trying to do is to implement 2 protocols - one internal, and one private, as Apple states "You cannot set a protocol requirement to a different access level than the protocol it supports."