Skip to content

[6.2][Sema] ConstnessChecker: Look through function conversions while chec… #81051

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
Apr 25, 2025

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Apr 23, 2025

…king arguments

Cherry-pick of #81049


  • Explanation:

    Avoid false-positive diagnostics about non-constant arguments in some APIs.

    In strict concurrency mode some calls could reference a declaration that is wrapped in one or more function conversion expressions to apply concurrency related attributes or erase them (such as @Sendable or @MainActor). This shouldn't impact constness checking and the checker should look through such conversions.

  • Main Branch PR: [Sema] ConstnessChecker: Look through function conversions while chec… #81049

  • Risk: Low (This change should be no-op because no swift interfaces are expected to be using the names yet).

  • Reviewed By: @slavapestov

  • Resolves: rdar://148168219

  • Testing: Added new tests to the Sema test suite.

(cherry picked from commit b484e96)

…king arguments

In strict concurrency mode some calls could reference a declaration that
is  wrapped in one or more function conversion expressions to apply
concurrency related attributes or erase them (such as `@Sendable` or
`@MainActor`). This shouldn't impact constness checking and the checker
should look through such conversions.

Resolves: rdar://148168219
(cherry picked from commit b484e96)
@xedin xedin added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels Apr 23, 2025
@xedin xedin requested a review from hborla April 23, 2025 21:22
@xedin xedin requested a review from a team as a code owner April 23, 2025 21:22
@xedin
Copy link
Contributor Author

xedin commented Apr 23, 2025

@swift-ci please test

@xedin xedin merged commit 995916a into swiftlang:release/6.2 Apr 25, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 6.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants