Skip to content

Commit e959573

Browse files
committed
Update Tests
1 parent f77d5e0 commit e959573

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/type/parameterized_protocol.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

191191
func takesSequenceOfInt2(_: any Sequence<Int>) {}
192-
// expected-error@-1 {{protocol type with type arguments can only be used as a generic constraint}}
193192

194193
func returnsSequenceOfInt2() -> any Sequence<Int> {}
195-
// expected-error@-1 {{protocol type with type arguments can only be used as a generic constraint}}
196194

197195
func 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

0 commit comments

Comments
 (0)