Skip to content

Conversation

@xedin
Copy link
Contributor

@xedin xedin commented Jun 10, 2025

…l levels of optional

Cherry-pick of #81852


  • Explanation:

    A member and a parameter could be wrapped in an arbitrary number of Optional, we need to look through all of them to get to the underlying function type.

  • Resolves: rdar://151943924

  • Main Branch PR: [TypeCheckEffects] Fix AbstractFunction::getType to look through al… #81852

  • Risk: Low. This is a narrow fix that affects only declaration references with two or more levels of optional that require effects checking.

  • Reviewed By: @DougGregor

  • Testing: Added new test-cases to the test suite.

(cherry picked from commit 86390ab)

…l levels of optional

A member and a parameter could be wrapped in an arbitrary number
of `Optional`, we need to look through all of them to get to the
underlying function type.

Resolves: rdar://151943924
(cherry picked from commit 86390ab)
@xedin xedin requested a review from a team as a code owner June 10, 2025 00:20
@xedin xedin changed the title [TypeCheckEffects] Fix AbstractFunction::getType to look through al… [6.2][TypeCheckEffects] Fix AbstractFunction::getType to look through al… Jun 10, 2025
@xedin xedin added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels Jun 10, 2025
@xedin
Copy link
Contributor Author

xedin commented Jun 10, 2025

@swift-ci please test

@xedin xedin merged commit dfd21ba into swiftlang:release/6.2 Jun 10, 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