Skip to content

A fixit should be offered for the "no 'async' operations occur within 'await' expression" warning #85818

@jamieQ

Description

@jamieQ

Description

title says it all. note, the current diagnostic id is: no_async_in_await

Reproduction

func f() {}

func g() async {
    await f() // ⚠️ no 'async' operations occur within 'await' expression
    // no fixit offered to remove the superfluous await
}

Expected behavior

a fixit should be offered to remove the superfluous await

Environment

Apple Swift version 6.2 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
Target: arm64-apple-macosx26.0

Additional information

No response

Metadata

Metadata

Assignees

Labels

async & awaitFeature → concurrency: asynchronous function aka the async/await patterncompilerThe Swift compiler itselfconcurrencyFeature: umbrella label for concurrency language featuresdiagnostics QoIBug: Diagnostics Quality of Implementationfix-itsFeature: diagnostic fix-itsswift 6.3type checkerArea → compiler: Semantic analysis

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions