mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Diagnostics] Improve diagnostic message for extraneous &
Resolves: https://github.com/apple/swift/issues/58389
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user