Skip to content

Ensure trailing trivia is trimmed from @Suite trait expressions #778

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
Oct 22, 2024

Conversation

stmontgomery
Copy link
Contributor

This ensures that if a @Suite includes one or more trait expression which includes trailing trivia, such as a //-style line comment, it is trimmed so that the macro expands to valid code.

Resolves #777

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

@stmontgomery stmontgomery added the bug 🪲 Something isn't working label Oct 21, 2024
@stmontgomery stmontgomery added this to the Swift 6.1 milestone Oct 21, 2024
@stmontgomery stmontgomery self-assigned this Oct 21, 2024
@stmontgomery
Copy link
Contributor Author

@swift-ci please test

@grynspan
Copy link
Contributor

Should we cherry-pick to release/6.0 and/or release/6.0.2?

@stmontgomery stmontgomery merged commit 88bdff3 into swiftlang:main Oct 22, 2024
3 checks passed
@stmontgomery stmontgomery deleted the trim-trait-trivia branch October 22, 2024 02:51
@stmontgomery
Copy link
Contributor Author

Should we cherry-pick to release/6.0 and/or release/6.0.2?

Unclear whether it's worthwhile since I'd consider this a fairly minor bug with an easy workaround. But if anyone wants this in pre-6.1, please chime in here and we can can consider it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error during @Suite expansion when comment is on the same line
2 participants