Skip to content

[NFC][Concurrency] Add a regression test for a bogus missing try diagnostic with async let. #69056

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

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

hborla
Copy link
Member

@hborla hborla commented Oct 9, 2023

func search(query: String) async throws -> [String] {
  let entities: [String] = []

  async let r = entities.filter { $0.contains(query) }.map { String($0) }
  return await r
}

The above example was reported as diagnosing error: reading 'async let' can throw but is not marked with 'try'. This has since been fixed on main, so this change is just adding a test case for the future.

Resolves rdar://96830163

@hborla
Copy link
Member Author

hborla commented Oct 9, 2023

@swift-ci please smoke test

@hborla hborla merged commit e253ca9 into swiftlang:main Oct 9, 2023
@hborla hborla deleted the concurrency-regression-tests branch October 9, 2023 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant