Skip to content

[Sema][Diagnostics][SR-14644] Improving diagnostics for key path with invalid components #37521

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 3 commits into from
May 20, 2021

Conversation

LucianoPAlmeida
Copy link
Contributor

This just adjust the hasSingleInvalidComponent key path expr method to only consider key path rooted on type expr because we only want to detect key paths without components e.g. \Int because actually key paths with invalid components like the SR example \Int.byteSwapped.signum() are represented in the AST also with a single invalid component but rooted on the whole expression. Also skips the fix for hole root key path if it has any invalid component as it would be already diagnosed.

Resolves SR-14644.

@LucianoPAlmeida LucianoPAlmeida requested a review from xedin May 20, 2021 00:55
Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci Please smoke test

@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci Please smoke test macOS platform

1 similar comment
@LucianoPAlmeida
Copy link
Contributor Author

@swift-ci Please smoke test macOS platform

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