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

[5.5][CSApply] Always map types out of context when setting interface types for wrapped closure parameters. #38480

Merged

Conversation

hborla
Copy link
Member

@hborla hborla commented Jul 19, 2021

Cherry-pick of #38479

  • Explanation: When using wrapped closure parameters with a generic type, the compiler will produce a bogus error message mentioning a conversion between two generic types that look identical. This happens because the interface type for the closure parameter (and the other synthesized property wrapper variables) mistakenly had archetypes in it because I forgot to call mapTypeOutOfContext when setting those interface types in CSApply to map the contextual type to an interface type. This change adds that call to the places where interface types are set for wrapped closure parameters.
  • Scope: This only affects wrapped closure parameters.
  • Risk: Very low.
  • Testing: Added a regression test.
  • Reviewer: @xedin

Resolves: rdar://80646669

@hborla hborla requested a review from a team as a code owner July 19, 2021 18:27
@hborla
Copy link
Member Author

hborla commented Jul 19, 2021

@swift-ci please test

@hborla hborla added the r5.5 label Jul 19, 2021
@hborla hborla merged commit 73a3881 into apple:release/5.5 Jul 19, 2021
@hborla hborla deleted the 5.5-generic-wrapped-parameter-closure branch July 19, 2021 22:57
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 2023
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 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants