mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ConstraintSystem] Don't produce partially matching note if none of the overloads matched
This commit is contained in:
committed by
Pavel Yaskevich
parent
5f8e3eb6f6
commit
58ffca8f74
@@ -10,11 +10,8 @@ func test_UnicodeScalarDoesNotImplementArithmetic(_ us: UnicodeScalar, i: Int) {
|
||||
isString(&a1)
|
||||
// We don't check for the overload choices list on the overload note match because they may change on different platforms.
|
||||
let a2 = "a" - "b" // expected-error {{binary operator '-' cannot be applied to two 'String' operands}}
|
||||
// expected-note@-1 {{overloads for '-' exist with these partially matching parameter lists:}}
|
||||
let a3 = "a" * "b" // expected-error {{binary operator '*' cannot be applied to two 'String' operands}}
|
||||
// expected-note@-1 {{overloads for '*' exist with these partially matching parameter lists:}}
|
||||
let a4 = "a" / "b" // expected-error {{binary operator '/' cannot be applied to two 'String' operands}}
|
||||
// expected-note@-1 {{overloads for '/' exist with these partially matching parameter lists:}}
|
||||
|
||||
let b1 = us + us // expected-error {{binary operator '+' cannot be applied to two 'UnicodeScalar' (aka 'Unicode.Scalar') operands}}
|
||||
let b2 = us - us // expected-error {{binary operator '-' cannot be applied to two 'UnicodeScalar' (aka 'Unicode.Scalar') operands}}
|
||||
|
||||
Reference in New Issue
Block a user