[Diagnostics] Improve diagnostic message for extraneous &

Resolves: https://github.com/apple/swift/issues/58389
This commit is contained in:
Pavel Yaskevich
2022-04-25 15:08:01 -07:00
parent 565ed69c80
commit a0d132582e
11 changed files with 40 additions and 40 deletions

View File

@@ -453,7 +453,7 @@ func testTypeSugar(_ a : Int) {
// <rdar://problem/21974772> SegFault in FailureDiagnosis::visitInOutExpr
func r21974772(_ y : Int) {
let x = &(1.0 + y) // expected-error {{use of extraneous '&'}}
let x = &(1.0 + y) // expected-error {{'&' may only be used to pass an argument to inout parameter}}
}
// <rdar://problem/22020088> QoI: missing member diagnostic on optional gives worse error message than existential/bound generic/etc