[CSFix] Make it possible to diagnose calls to non-functions in ambiguity contexts

Resolves: rdar://86611718
This commit is contained in:
Pavel Yaskevich
2021-12-20 15:23:03 -08:00
parent 2bf05b96e5
commit d5b11a6136
3 changed files with 10 additions and 1 deletions

View File

@@ -1484,3 +1484,8 @@ func testUnwrapFixIts(x: Int?) throws {
// expected-note@-2 {{force-unwrap using '!' to abort execution if the optional value contains 'nil'}} {{42-42=!}}
let _: Int = try! .optionalThrowsMember ?? 0
}
func rdar86611718(list: [Int]) {
String(list.count())
// expected-error@-1 {{cannot call value of non-function type 'Int'}}
}