Skip to content

[Sema] Scale back CodingKeys hack in TypeChecker::lookupUnqualifiedType #82237

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hamishknight
Copy link
Contributor

@hamishknight hamishknight commented Jun 13, 2025

I previously added this hack to match the logic in TypeChecker::lookupUnqualified (#79850), 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

…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
Copy link
Contributor Author

@swift-ci please test

@hamishknight
Copy link
Contributor Author

@swift-ci please test source compatibility

@hamishknight
Copy link
Contributor Author

swiftlang/swift-driver#1931

@swift-ci please test

@hamishknight hamishknight enabled auto-merge June 14, 2025 11:54
@hamishknight
Copy link
Contributor Author

swiftlang/swift-driver#1931

@swift-ci please test Windows

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.

3 participants