@@ -8,12 +8,13 @@ func isString(_ s: inout String) {}
8
8
func test_UnicodeScalarDoesNotImplementArithmetic( _ us: UnicodeScalar , i: Int ) {
9
9
var a1 = " a " + " b " // OK
10
10
isString ( & a1)
11
+ // We don't check for the overload choices list on the overload note match because they may change on different platforms.
11
12
let a2 = " a " - " b " // expected-error {{binary operator '-' cannot be applied to two 'String' operands}}
12
- // expected-note@-1 {{overloads for '-' exist with these partially matching parameter lists: (Double, Double), (Float, Float), (Float16, Float16), (Float80, Float80), (Int, Int), (Int16, Int16), (Int32, Int32), (Int64, Int64), (Int8, Int8), (UInt, UInt), (UInt16, UInt16), (UInt32, UInt32), (UInt64, UInt64), (UInt8, UInt8) }}
13
+ // expected-note@-1 {{overloads for '-' exist with these partially matching parameter lists:}}
13
14
let a3 = " a " * " b " // expected-error {{binary operator '*' cannot be applied to two 'String' operands}}
14
- // expected-note@-1 {{overloads for '*' exist with these partially matching parameter lists: (Double, Double), (Float, Float), (Float16, Float16), (Float80, Float80), (Int, Int), (Int16, Int16), (Int32, Int32), (Int64, Int64), (Int8, Int8), (UInt, UInt), (UInt16, UInt16), (UInt32, UInt32), (UInt64, UInt64), (UInt8, UInt8) }}
15
+ // expected-note@-1 {{overloads for '*' exist with these partially matching parameter lists:}}
15
16
let a4 = " a " / " b " // expected-error {{binary operator '/' cannot be applied to two 'String' operands}}
16
- // expected-note@-1 {{overloads for '/' exist with these partially matching parameter lists: (Double, Double), (Float, Float), (Float16, Float16), (Float80, Float80), (Int, Int), (Int16, Int16), (Int32, Int32), (Int64, Int64), (Int8, Int8), (UInt, UInt), (UInt16, UInt16), (UInt32, UInt32), (UInt64, UInt64), (UInt8, UInt8) }}
17
+ // expected-note@-1 {{overloads for '/' exist with these partially matching parameter lists:}}
17
18
18
19
let b1 = us + us // expected-error {{binary operator '+' cannot be applied to two 'UnicodeScalar' (aka 'Unicode.Scalar') operands}}
19
20
let b2 = us - us // expected-error {{binary operator '-' cannot be applied to two 'UnicodeScalar' (aka 'Unicode.Scalar') operands}}
0 commit comments