Skip to content

Commit efe4a8d

Browse files
Merge pull request swiftlang#33095 from LucianoPAlmeida/SR-13240-windows-fix-build
[SR-13240][tests] Fixing pattern match of note available overload lists diagnostic
2 parents ddc0494 + 33d2371 commit efe4a8d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/stdlib/UnicodeScalarDiagnostics.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ func isString(_ s: inout String) {}
88
func test_UnicodeScalarDoesNotImplementArithmetic(_ us: UnicodeScalar, i: Int) {
99
var a1 = "a" + "b" // OK
1010
isString(&a1)
11+
// We don't check for the overload choices list on the overload note match because they may change on different platforms.
1112
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:}}
1314
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:}}
1516
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:}}
1718

1819
let b1 = us + us // expected-error {{binary operator '+' cannot be applied to two 'UnicodeScalar' (aka 'Unicode.Scalar') operands}}
1920
let b2 = us - us // expected-error {{binary operator '-' cannot be applied to two 'UnicodeScalar' (aka 'Unicode.Scalar') operands}}

0 commit comments

Comments
 (0)