Skip to content

[stdlib] Print a special message when we fail getting a keypath value #72821

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

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

Azoy
Copy link
Contributor

@Azoy Azoy commented Apr 3, 2024

In certain cases, Value has the same layout as Value? and the "nullptr" representation of Value is represented as nil for Value?. If we're returning a Value, but manage to get its nil representation, then the above check will fail.

This error message isn't too particularly useful just in case we manage to hit it when the above assumption is not correct, but it is a good indicator and gives us a place to look when it does get hit to help diagnose issues.

Resolves: rdar://125367937

@Azoy Azoy requested review from jckarter and mikeash April 3, 2024 22:38
@Azoy Azoy requested a review from a team as a code owner April 3, 2024 22:38
@Azoy
Copy link
Contributor Author

Azoy commented Apr 3, 2024

@swift-ci please smoke test

@Azoy Azoy merged commit 36569ea into swiftlang:main Apr 4, 2024
@Azoy Azoy deleted the keypath-null-bad branch April 4, 2024 02:56
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.

2 participants