Skip to content

[6.1] Look for keywords in inactive #if regions when checking for variable uses #79598

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

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Feb 25, 2025

  • Explanation: Removal of the IfConfigDecl AST node and the move to the new SwiftIfConfig library caused a diagnostics regression when a captured self is only referenced within an inactive #if region.
  • Scope: Only impacts diagnostics by suppressing variable 'self' was written to, but never read diagnostic when self is used within code in an inactive #if region.
  • Issues: Swift 6.1 diagnostic regression #79555
  • Original PRs: Look for keywords in inactive #if regions when checking for variable uses #79597
  • Risk: Low; this change restores the behavior before the removal of IfConfigDecl from the AST.
  • Testing: N/A

@DougGregor DougGregor requested a review from a team as a code owner February 25, 2025 02:07
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please test macOS

2 similar comments
@DougGregor
Copy link
Member Author

@swift-ci please test macOS

@DougGregor
Copy link
Member Author

@swift-ci please test macOS

@DougGregor DougGregor merged commit 5095808 into swiftlang:release/6.1 Feb 26, 2025
5 checks passed
@DougGregor DougGregor deleted the keyword-in-inactive-if-6.1 branch February 26, 2025 05:15
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