Skip to content

Conversation

@hamishknight
Copy link
Contributor

5.3 cherry-pick of #31671 & #31829


Explanation: Fixes a key path compiler crasher and improves diagnostics for invalid key paths.

Scope: Affects diagnostics for invalid key paths, and fixes a compiler crasher for both invalid key paths and a small number of valid key paths.

Radars/SRs: rdar://62201037, SR-12437 & SR-12823.

Risk: Fairly low, only affects the constraint system's diagnostic mode.

Testing: Added unit tests, tested by external and internal CI.

Reviewer: @xedin.

LucianoPAlmeida and others added 2 commits May 17, 2020 20:16
We currently leave a key path constraint unsolved
if one of its components hasn't yet had its
overload resolved. However, for e.g a missing
member component, the overload type variable will
be bound to a hole and an overload will never be
resolved.

Tweak the logic to consider the key path constraint
trivially solved if one of its components has been
marked as a hole, which will allow the key path
type itself to be marked as a hole.

Resolves SR-12437 & SR-12823.
Resolves rdar://62201037.
@hamishknight hamishknight requested a review from a team as a code owner May 18, 2020 17:38
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@tkremenek tkremenek merged commit ea0af30 into swiftlang:release/5.3 May 18, 2020
@hamishknight hamishknight deleted the solved-holistically-5.3 branch May 18, 2020 22:57
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks 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.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants