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

Wrong diagnostic with async throws property #59614

Open
NachoSoto opened this issue Jun 21, 2022 · 0 comments
Open

Wrong diagnostic with async throws property #59614

NachoSoto opened this issue Jun 21, 2022 · 0 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@NachoSoto
Copy link
Contributor

NachoSoto commented Jun 21, 2022

To Reproduce

struct A {
    var p: Int {
        async get throws { return 0 }
    }
}

Expected behavior

  • Fix-it to replace async get throws with get async throws

Actual behavior

error: repl.swift:3:9: error: found 'async' in expression; did you mean 'await'?
        async get throws {
        ^~~~~
        await

error: repl.swift:3:19: error: 'throws' may only occur before '->'
        async get throws {
                  ^

Environment

  • OS: macOS 13.0 beta 1
  • Swift version: 5.7 (swiftlang-5.7.0.113.202 clang-1400.0.16.2)
@NachoSoto NachoSoto added the bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. label Jun 21, 2022
@etcwilde etcwilde self-assigned this Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

2 participants