Skip to content

[5.9] Add diagnostic for wrong where requirements separation #1530

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

Conversation

kimdv
Copy link
Contributor

@kimdv kimdv commented Apr 13, 2023

  • Explanation: If there is a&& in a generic where requirement the parser didn't recover correctly and emitted a wrong diagnostic. This fix ensures we recover well and have a correct diagnostic and fix-it.
  • Scope: Parsing of generic where requirements
  • Risk: Low, improves diagnostic
  • Testing: CI didn’t find any issues
  • Issue: N/A
  • Reviewer: @ahoppen on Add diagnostic for wrong where requirements separation #1513

@kimdv kimdv requested a review from ahoppen as a code owner April 13, 2023 06:06
@kimdv kimdv changed the title Add diagnostic for wrong where requirements separation [5.9] Add diagnostic for wrong where requirements separation Apr 13, 2023
@kimdv
Copy link
Contributor Author

kimdv commented Apr 13, 2023

@swift-ci please test

@ahoppen
Copy link
Member

ahoppen commented Apr 13, 2023

@swift-ci Please test Windows

@kimdv kimdv requested a review from bnbarham April 19, 2023 15:01
…-testRecovery177

Add diagnostic for wrong where requirements separation
@kimdv kimdv force-pushed the kimdv/cherry-pick-add-diagnostic-for-testRecovery177 branch from ff230dc to 8ce0e0d Compare April 23, 2023 17:51
@@ -2174,15 +2174,17 @@ final class RecoveryTests: XCTestCase {
}

func testRecovery177() {
// rdar://38225184
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't needed any more (I'm fine with just fixing that on main FWIW)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just to be clear.
Should it be removed or? 😁

Copy link
Member

Choose a reason for hiding this comment

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

@bnbarham Just for clarification, this radar number has been carried over from the old parser tests because it was the motivation for the test case. I agree that it has very marginal value by now. I personally don’t have a strong opinion to keeping or removing it.

@kimdv just for your information: The contents of that radar are the same as swiftlang/swift#54086

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough, personally I'd much prefer a comment on what it's testing rather than a radar number (or the GitHub issue). For something with tonnes of details, sure, link out to the issue. For this though... 🤷

Anyway, I know you didn't add it - it was mostly a drive by comment. No need to fix in this PR.

@ahoppen
Copy link
Member

ahoppen commented May 19, 2023

@swift-ci Please test

@kimdv
Copy link
Contributor Author

kimdv commented May 19, 2023

@swift-ci please test windows

@kimdv kimdv merged commit 83c2be9 into swiftlang:release/5.9 May 19, 2023
@kimdv kimdv deleted the kimdv/cherry-pick-add-diagnostic-for-testRecovery177 branch May 19, 2023 22:36
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