File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ protocol Invalid5<Element, Element> {
2929
3030/// Test semantics
3131
32- protocol Sequence < Element> {
32+ protocol Sequence < Element> { // expected-note {{'Sequence' declared here}}
3333 associatedtype Element
3434 // expected-note@-1 {{protocol requires nested type 'Element'; do you want to add it?}}
3535}
@@ -189,17 +189,17 @@ func returnsSequenceOfInt1() -> Sequence<Int> {}
189189// expected-error@-1 {{protocol type with type arguments can only be used as a generic constraint}}
190190
191191func takesSequenceOfInt2( _: any Sequence < Int > ) { }
192- // expected-error@-1 {{protocol type with type arguments can only be used as a generic constraint}}
193192
194193func returnsSequenceOfInt2( ) -> any Sequence < Int > { }
195- // expected-error@-1 {{protocol type with type arguments can only be used as a generic constraint}}
196194
197195func typeExpr( ) {
198196 _ = Sequence< Int> . self
199197 // expected-error@-1 {{protocol type with type arguments can only be used as a generic constraint}}
200198
201199 _ = any Sequence< Int> . self
202- // expected-error@-1 {{protocol type with type arguments can only be used as a generic constraint}}
200+ // expected-error@-1 {{'self' is not a member type of protocol 'parameterized_protocol.Sequence<Swift.Int>'}}
201+
202+ _ = ( any Sequence < Int > ) . self
203203}
204204
205205/// Not supported as a protocol composition term for now
You can’t perform that action at this time.
0 commit comments