@@ -8,9 +8,12 @@ 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
- let a2 = " a " - " b " // expected-error {{binary operator '-' cannot be applied to two 'String' operands}} expected-note {{}}
12
- let a3 = " a " * " b " // expected-error {{binary operator '*' cannot be applied to two 'String' operands}} expected-note {{}}
13
- let a4 = " a " / " b " // expected-error {{binary operator '/' cannot be applied to two 'String' operands}} expected-note {{}}
11
+ 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
+ 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
+ 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)}}
14
17
15
18
let b1 = us + us // expected-error {{binary operator '+' cannot be applied to two 'UnicodeScalar' (aka 'Unicode.Scalar') operands}}
16
19
let b2 = us - us // expected-error {{binary operator '-' cannot be applied to two 'UnicodeScalar' (aka 'Unicode.Scalar') operands}}
0 commit comments