Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-13759] Suggest fix-it for missing await in async call. #56156

Closed
kavon opened this issue Oct 21, 2020 · 4 comments
Closed

[SR-13759] Suggest fix-it for missing await in async call. #56156

kavon opened this issue Oct 21, 2020 · 4 comments
Labels
compiler The Swift compiler in itself concurrency Feature: umbrella label for concurrency language features improvement

Comments

@kavon
Copy link
Contributor

kavon commented Oct 21, 2020

Previous ID SR-13759
Radar rdar://problem/70542680
Original Reporter @kavon
Type Improvement
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, Concurrency
Assignee maldahleh (JIRA)
Priority Medium

md5: d3481497d46d8a0fd4b34b5325bd01f0

Issue Description:

The following code,

func someAsyncFun() async {}

func anotherAsyncFun() async {
  someAsyncFun()
}

results in only the diagnostic,

test.swift:4:3: error: call is 'async' but is not marked with 'await'
  someAsyncFun()
  ^~~~~~~~~~~~~~

It would be good if we offered a fix-it to add 'await'. We should also ensure that this fix-it is not offered if the same mistake is made inside of a synchronous function (a different error is thrown in that case anyway).

@typesanitizer
Copy link

@swift-ci create

@swift-ci
Copy link
Collaborator

Comment by Mohammed Al-Dahleh (JIRA)

I'm interested in trying this out

@swift-ci
Copy link
Collaborator

Comment by Mohammed Al-Dahleh (JIRA)

PR: #34509

@swift-ci
Copy link
Collaborator

Comment by Mohammed Al-Dahleh (JIRA)

Resolved by #34509

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself concurrency Feature: umbrella label for concurrency language features improvement
Projects
None yet
Development

No branches or pull requests

3 participants