You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The thing is that 'extension A where Self : B' is not the same as 'extension B where Self : A', especially if one of A or B is a class type. But we could support this eventually once we work out the quirks.
Swift 4's access control model would treat them differently. "extension A where Self: B" would have access to private members of A (but not B), whereas "extension B where Self: A" would have access to private members of B (but not A).
The compiler is correct to reject these extensions. Changing the language to accept such extensions is something that would need to go through the Swift evolution process.
Environment
Swift 4
Xcode 9.0 beta (9M136h)
Additional Detail from JIRA
md5: 5961a05fab1e2142b9a0b4821da3e20a
Issue Description:
Since
extension A where Self: B
is valid, andC
is defined as anyA
that also inherits fromB
,extension C
should be just as valid.The text was updated successfully, but these errors were encountered: