@@ -83,19 +83,19 @@ func warnNestedOptionalToOptionalAnyCoercion(_ a: Int?, _ b: Any??, _ c: Int???,
83
83
}
84
84
85
85
func warnIUOToAnyCoercion( _ a: Int ! , _ b: Any ? ! ) {
86
- _ = takeAny ( a, b) // expected-warning {{expression implicitly coerced from 'Int! ' to 'Any'}}
86
+ _ = takeAny ( a, b) // expected-warning {{expression implicitly coerced from 'Int? ' to 'Any'}}
87
87
// expected-note@-1 {{provide a default value to avoid this warning}}{{16-16= ?? <#default value#>}}
88
88
// expected-note@-2 {{force-unwrap the value to avoid this warning}}{{16-16=!}}
89
89
// expected-note@-3 {{explicitly cast to 'Any' with 'as Any' to silence this warning}}{{16-16= as Any}}
90
- // expected-warning@-4 {{expression implicitly coerced from 'Any?! ' to 'Any'}}
90
+ // expected-warning@-4 {{expression implicitly coerced from 'Any?? ' to 'Any'}}
91
91
// expected-note@-5 {{force-unwrap the value to avoid this warning}}{{19-19=!!}}
92
92
// expected-note@-6 {{explicitly cast to 'Any' with 'as Any' to silence this warning}}{{19-19= as Any}}
93
93
94
94
_ = takeAny ( a as Any , b as Any )
95
95
}
96
96
97
97
func warnIUOToOptionalAnyCoercion( _ a: Int ! , _ b: Any ? ! , _ c: Int ? ? ! , _ d: Any ? ? ? ! ) {
98
- takesOptionalAny ( a, b) // expected-warning {{expression implicitly coerced from 'Any?! ' to 'Any?'}}
98
+ takesOptionalAny ( a, b) // expected-warning {{expression implicitly coerced from 'Any?? ' to 'Any?'}}
99
99
// expected-note@-1 {{provide a default value to avoid this warning}}{{24-24= ?? <#default value#>}}
100
100
// expected-note@-2 {{force-unwrap the value to avoid this warning}}{{24-24=!}}
101
101
// expected-note@-3 {{explicitly cast to 'Any?' with 'as Any?' to silence this warning}}{{24-24= as Any?}}
@@ -104,10 +104,10 @@ func warnIUOToOptionalAnyCoercion(_ a: Int!, _ b: Any?!, _ c: Int??!, _ d: Any??
104
104
takesOptionalAny ( a, b!)
105
105
takesOptionalAny ( a, b as Any ? )
106
106
107
- takesOptionalAny ( c, d) // expected-warning {{expression implicitly coerced from 'Int??! ' to 'Any?'}}
107
+ takesOptionalAny ( c, d) // expected-warning {{expression implicitly coerced from 'Int??? ' to 'Any?'}}
108
108
// expected-note@-1 {{force-unwrap the value to avoid this warning}}{{21-21=!!}}
109
109
// expected-note@-2 {{explicitly cast to 'Any?' with 'as Any?' to silence this warning}}{{21-21= as Any?}}
110
- // expected-warning@-3 {{expression implicitly coerced from 'Any???! ' to 'Any?'}}
110
+ // expected-warning@-3 {{expression implicitly coerced from 'Any???? ' to 'Any?'}}
111
111
// expected-note@-4 {{force-unwrap the value to avoid this warning}}{{24-24=!!!}}
112
112
// expected-note@-5 {{explicitly cast to 'Any?' with 'as Any?' to silence this warning}}{{24-24= as Any?}}
113
113
@@ -118,7 +118,7 @@ func warnIUOToOptionalAnyCoercion(_ a: Int!, _ b: Any?!, _ c: Int??!, _ d: Any??
118
118
func takesIUO( _: Any ! , _: Any ! ) { }
119
119
120
120
func warnOptionalToIUOAny( _ a: Int ? , _ b: Any ? ? , _ c: Int ? ? ? , _ d: Any ? ? ? ? ) {
121
- takesIUO ( a, b) // expected-warning {{expression implicitly coerced from 'Any??' to 'Any! '}}
121
+ takesIUO ( a, b) // expected-warning {{expression implicitly coerced from 'Any??' to 'Any? '}}
122
122
// expected-note@-1 {{provide a default value to avoid this warning}}{{16-16= ?? <#default value#>}}
123
123
// expected-note@-2 {{force-unwrap the value to avoid this warning}}{{16-16=!}}
124
124
// expected-note@-3 {{explicitly cast to 'Any?' with 'as Any?' to silence this warning}}{{16-16= as Any?}}
@@ -127,10 +127,10 @@ func warnOptionalToIUOAny(_ a: Int?, _ b: Any??, _ c: Int???, _ d: Any????) {
127
127
takesIUO ( a, b!)
128
128
takesIUO ( a, b as Any ? )
129
129
130
- takesIUO ( c, d) // expected-warning {{expression implicitly coerced from 'Int???' to 'Any! '}}
130
+ takesIUO ( c, d) // expected-warning {{expression implicitly coerced from 'Int???' to 'Any? '}}
131
131
// expected-note@-1 {{force-unwrap the value to avoid this warning}}{{13-13=!!}}
132
132
// expected-note@-2 {{explicitly cast to 'Any?' with 'as Any?' to silence this warning}}{{13-13= as Any?}}
133
- // expected-warning@-3 {{expression implicitly coerced from 'Any????' to 'Any! '}}
133
+ // expected-warning@-3 {{expression implicitly coerced from 'Any????' to 'Any? '}}
134
134
// expected-note@-4 {{force-unwrap the value to avoid this warning}}{{16-16=!!!}}
135
135
// expected-note@-5 {{explicitly cast to 'Any?' with 'as Any?' to silence this warning}}{{16-16= as Any?}}
136
136
0 commit comments