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][GSB] Fix crash on cond conformances with invalid req
Fixes crashes related to retrieving a generic signature that is currently being built.
This happens when a conditional conformance has a invalid requirement where the subject
is the 'self' type and the constraint is a protocol to which 'self' already conforms.
The most trivial case is when this latter conformance is the conditional conformance itself.
// expected-error@-1{{'Self' is only available in a protocol or as the result of a method in a class; did you mean 'GenericClass'?}} {{30-34=GenericClass}}
145
145
// expected-error@-2{{type 'GenericClass<T>' in conformance requirement does not refer to a generic parameter or associated type}}
146
146
147
+
protocolProt1{}
148
+
protocolProt2{}
149
+
protocolProt3{}
150
+
protocolProt4{}
151
+
protocolProt5{}
152
+
153
+
extensionGenericClass:Prot1where T:Prot1{}
154
+
extensionGenericClass:Prot2where Self:Prot1{}
155
+
// expected-error@-1 {{'Self' is only available in a protocol or as the result of a method in a class; did you mean 'GenericClass'?}}
156
+
// expected-error@-2 {{type 'GenericClass<T>' in conformance requirement does not refer to a generic parameter or associated type}}
0 commit comments