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
Sema: Allow nested typealiases to reference protocols with associated type or Self requirements
Previously we allowed this:
protocol HasSelf {
func foo(_: Self)
}
typealias Alias = HasSelf
But not this:
struct Outer {
typealias Alias = HasSelf
}
Lift this restriction since the new String implementation
wants to make use of it.
func useAsType(_ x:HasSelfRequirements){} // expected-error{{protocol 'HasSelfRequirements' can only be used as a generic constraint}}
38
40
func useCompoAsType(_ x:HasSelfRequirements&Bar){} // expected-error{{protocol 'HasSelfRequirements' can only be used as a generic constraint}}
39
41
func useCompoAliasAsType(_ x:Compo){} // expected-error{{protocol 'HasSelfRequirements' can only be used as a generic constraint}}
42
+
func useNestedCompoAliasAsType(_ x:CompoAssocType.Compo){} // expected-error{{protocol 'HasSelfRequirements' can only be used as a generic constraint}}
0 commit comments