Skip to content

Conversation

@hamishknight
Copy link
Contributor

6.2 cherry-pick of #82237

  • Explanation: Fixes a source compatibility regression that could occur when CodingKeys is used in a generic requirement for one of Codable's potential value witnesses
  • Scope: Scales back a lookup hack added previously for 6.2 to maintain compatibility with 6.1
  • Issue: rdar://153096639
  • Risk: Low, implements a more limited form of a recent 6.2 change
  • Testing: Added tests to test suite
  • Reviewer: Pavel Yaskevich

…ype`

I previously added this hack to match the logic in
`TypeChecker::lookupUnqualified`, but it turns out that can introduce
request cycles for cases where `CodingKeys` is used in a generic
requirement for one of `Codable`'s potential value witnesses. Scale
back the hack such that it's only done when we get an initial empty
lookup result, ensuring we maintain source compatibility. Both these
lookup hacks should go away once we properly handle CodingKeys 
synthesis.

rdar://153096639
@hamishknight hamishknight requested review from bnbarham and hborla June 13, 2025 19:35
@hamishknight hamishknight requested a review from a team as a code owner June 13, 2025 19:35
@hamishknight hamishknight added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels Jun 13, 2025
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit c1db12a into swiftlang:release/6.2 Jun 14, 2025
5 checks passed
@hamishknight hamishknight deleted the cod-cycle-6.2 branch June 14, 2025 11:54
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