You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// expected-explicit-any-warning@-1 {{use of protocol 'Bar' as a type must be written 'any Bar'; this will be an error in a future Swift language mode}}{{23-26=any Bar}}
35
+
// expected-explicit-any-adopt-warning@-2 {{use of protocol 'Bar' as a type must be written 'any Bar' [ExistentialAny]}}{{23-26=any Bar}}
23
36
classfunc returnBar()->Bar{}
24
37
// expected-explicit-any-warning@-1 {{use of protocol 'Bar' as a type must be written 'any Bar'; this will be an error in a future Swift language mode}}{{29-32=any Bar}}
38
+
// expected-explicit-any-adopt-warning@-2 {{use of protocol 'Bar' as a type must be written 'any Bar' [ExistentialAny]}}{{29-32=any Bar}}
25
39
}
26
40
27
41
func useBarAsType(_ x:anyBar){}
@@ -221,6 +235,7 @@ enum E1: RawRepresentable {
221
235
222
236
varrawValue:P1{
223
237
// expected-explicit-any-warning@-1 {{use of protocol 'P1' as a type must be written 'any P1'; this will be an error in a future Swift language mode}}{{17-19=any P1}}
238
+
// expected-explicit-any-adopt-warning@-2 {{use of protocol 'P1' as a type must be written 'any P1' [ExistentialAny]}}{{17-19=any P1}}
224
239
returnConcreteComposition()
225
240
}
226
241
}
@@ -318,8 +333,10 @@ enum EE : Equatable, any Empty { // expected-error {{raw type 'any Empty' is not
318
333
319
334
// Protocols from a serialized module (the standard library).
320
335
do{
336
+
// expected-explicit-any-adopt-warning@+2 {{use of protocol 'Decodable' as a type must be written 'any Decodable' [ExistentialAny]}}
321
337
// expected-explicit-any-warning@+1 {{use of protocol 'Decodable' as a type must be written 'any Decodable'; this will be an error in a future Swift language mode}}
322
338
let _:Decodable
339
+
// expected-explicit-any-adopt-warning@+2 {{use of 'Codable' (aka 'Decodable & Encodable') as a type must be written 'any Codable' (aka 'any Decodable & Encodable') [ExistentialAny]}}
323
340
// expected-explicit-any-warning@+1 {{use of 'Codable' (aka 'Decodable & Encodable') as a type must be written 'any Codable' (aka 'any Decodable & Encodable'); this will be an error in a future Swift language mode}}
// expected-warning@+1 {{use of protocol 'HasAssoc' as a type must be written 'any HasAssoc'}}
549
566
case c2((HasAssoc)->Void)
567
+
// expected-explicit-any-adopt-warning@+2 {{use of protocol 'P' as a type must be written 'any P' [ExistentialAny]}}
550
568
// expected-explicit-any-warning@+1 {{use of protocol 'P' as a type must be written 'any P'; this will be an error in a future Swift language mode}}
551
569
case c3((P)->Void)
552
570
}
@@ -574,5 +592,7 @@ func f(_ x: Objectlike) {}
574
592
typealiasCopy=Copyable
575
593
func h(_ z1:Copy,
576
594
// expected-explicit-any-warning@-1 {{use of 'Copy' (aka 'Copyable') as a type must be written 'any Copy' (aka 'any Copyable'); this will be an error in a future Swift language mode}}
595
+
// expected-explicit-any-adopt-warning@-2 {{use of 'Copy' (aka 'Copyable') as a type must be written 'any Copy' (aka 'any Copyable') [ExistentialAny]}}
577
596
_ z2:Copyable){}
578
597
// expected-explicit-any-warning@-1 {{use of protocol 'Copyable' as a type must be written 'any Copyable'; this will be an error in a future Swift language mode}}
598
+
// expected-explicit-any-adopt-warning@-2 {{use of protocol 'Copyable' as a type must be written 'any Copyable' [ExistentialAny]}}
0 commit comments