@@ -16,15 +16,15 @@ func fOP<T : OP>(_ t: T) { }
16
16
func fOPE( _ t: OP ) { }
17
17
func fSP< T : SP > ( _ t: T ) { }
18
18
func fAO< T : AnyObject > ( _ t: T ) { }
19
- // expected-note@-1 {{required by global function 'fAO' where 'T' = 'P'}}
20
- // expected-note@-2 {{required by global function 'fAO' where 'T' = 'CP'}}
21
- // expected-note@-3 {{required by global function 'fAO' where 'T' = 'OP & P'}}
19
+ // expected-note@-1 {{where 'T' = 'P'}}
20
+ // expected-note@-2 {{where 'T' = 'CP'}}
21
+ // expected-note@-3 {{where 'T' = 'OP & P'}}
22
22
func fAOE( _ t: AnyObject ) { }
23
23
func fT< T> ( _ t: T ) { }
24
24
25
25
func testPassExistential( _ p: P , op: OP , opp: OP & P , cp: CP , sp: SP , any: Any , ao: AnyObject ) {
26
26
fP ( p) // expected-error{{value of protocol type 'P' cannot conform to 'P'; only struct/enum/class types can conform to protocols}}
27
- fAO ( p) // expected-error{{value of protocol type 'P' cannot conform to 'AnyObject'; only struct/enum/ class types can conform to protocols }}
27
+ fAO ( p) // expected-error{{global function 'fAO' requires that 'P' be a class type }}
28
28
fAOE ( p) // expected-error{{argument type 'P' does not conform to expected type 'AnyObject'}}
29
29
fT ( p)
30
30
@@ -33,13 +33,13 @@ func testPassExistential(_ p: P, op: OP, opp: OP & P, cp: CP, sp: SP, any: Any,
33
33
fAOE ( op)
34
34
fT ( op)
35
35
36
- fAO ( cp) // expected-error{{value of protocol type 'CP' cannot conform to 'AnyObject'; only struct/enum/ class types can conform to protocols }}
36
+ fAO ( cp) // expected-error{{global function 'fAO' requires that 'CP' be a class type }}
37
37
fAOE ( cp)
38
38
fT ( cp)
39
39
40
40
fP ( opp) // expected-error{{value of protocol type 'OP & P' cannot conform to 'P'; only struct/enum/class types can conform to protocols}}
41
41
fOP ( opp) // expected-error{{value of protocol type 'OP & P' cannot conform to 'OP'; only struct/enum/class types can conform to protocols}}
42
- fAO ( opp) // expected-error{{value of protocol type 'OP & P' cannot conform to 'AnyObject'; only struct/enum/ class types can conform to protocols }}
42
+ fAO ( opp) // expected-error{{global function 'fAO' requires that 'OP & P' be a class type }}
43
43
fAOE ( opp)
44
44
fT ( opp)
45
45
0 commit comments