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 {
282
282
case Context::Inherited:
283
283
case Context::ExtensionBinding:
284
284
case Context::GenericRequirement:
285
+ case Context::ExistentialConstraint:
285
286
return true ;
286
287
case Context::None:
287
288
case Context::TypeAliasDecl:
288
289
case Context::GenericTypeAliasDecl:
289
290
case Context::MetatypeBase:
290
- case Context::ExistentialConstraint:
291
291
case Context::InExpression:
292
292
case Context::ExplicitCastExpr:
293
293
case Context::ForEachStmt:
Original file line number Diff line number Diff line change @@ -158,10 +158,8 @@ func returnsSequenceOfInt1() -> Sequence<Int> {}
158
158
// expected-error@-1 {{protocol type with generic arguments can only be used as a generic constraint}}
159
159
160
160
func takesSequenceOfInt2( _: any Sequence < Int > ) { }
161
- // expected-error@-1 {{protocol type with generic arguments can only be used as a generic constraint}}
162
161
163
162
func returnsSequenceOfInt2( ) -> any Sequence < Int > { }
164
- // expected-error@-1 {{protocol type with generic arguments can only be used as a generic constraint}}
165
163
166
164
func typeExpr( ) {
167
165
_ = Sequence< Int> . self
You can’t perform that action at this time.
0 commit comments