File tree Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -282,12 +282,12 @@ class TypeResolutionOptions {
282282 case Context::Inherited:
283283 case Context::ExtensionBinding:
284284 case Context::GenericRequirement:
285+ case Context::ExistentialConstraint:
285286 return true ;
286287 case Context::None:
287288 case Context::TypeAliasDecl:
288289 case Context::GenericTypeAliasDecl:
289290 case Context::MetatypeBase:
290- case Context::ExistentialConstraint:
291291 case Context::InExpression:
292292 case Context::ExplicitCastExpr:
293293 case Context::ForEachStmt:
Original file line number Diff line number Diff line change @@ -158,10 +158,8 @@ func returnsSequenceOfInt1() -> Sequence<Int> {}
158158// expected-error@-1 {{protocol type with generic arguments can only be used as a generic constraint}}
159159
160160func takesSequenceOfInt2( _: any Sequence < Int > ) { }
161- // expected-error@-1 {{protocol type with generic arguments can only be used as a generic constraint}}
162161
163162func returnsSequenceOfInt2( ) -> any Sequence < Int > { }
164- // expected-error@-1 {{protocol type with generic arguments can only be used as a generic constraint}}
165163
166164func typeExpr( ) {
167165 _ = Sequence< Int> . self
You can’t perform that action at this time.
0 commit comments