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> {
29
29
30
30
/// Test semantics
31
31
32
- protocol Sequence < Element> {
32
+ protocol Sequence < Element> { // expected-note {{'Sequence' declared here}}
33
33
associatedtype Element
34
34
// expected-note@-1 {{protocol requires nested type 'Element'; do you want to add it?}}
35
35
}
@@ -189,17 +189,17 @@ func returnsSequenceOfInt1() -> Sequence<Int> {}
189
189
// expected-error@-1 {{protocol type with type arguments can only be used as a generic constraint}}
190
190
191
191
func takesSequenceOfInt2( _: any Sequence < Int > ) { }
192
- // expected-error@-1 {{protocol type with type arguments can only be used as a generic constraint}}
193
192
194
193
func returnsSequenceOfInt2( ) -> any Sequence < Int > { }
195
- // expected-error@-1 {{protocol type with type arguments can only be used as a generic constraint}}
196
194
197
195
func typeExpr( ) {
198
196
_ = Sequence< Int> . self
199
197
// expected-error@-1 {{protocol type with type arguments can only be used as a generic constraint}}
200
198
201
199
_ = 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
203
203
}
204
204
205
205
/// Not supported as a protocol composition term for now
You can’t perform that action at this time.
0 commit comments