Fix whitespace in convertStoredPropertyToComputed #3326
Merged
ahoppen merged 2 commits intoMay 8, 2026
Merged
Conversation
ahoppen
reviewed
May 7, 2026
Member
ahoppen
left a comment
There was a problem hiding this comment.
Thanks. Small nitpick, otherwise LGTM.
| } else if let providedType = context.type { | ||
| typeAnnotation = TypeAnnotationSyntax(type: providedType) | ||
| typeAnnotation = TypeAnnotationSyntax( | ||
| colon: .colonToken(leadingTrivia: [], trailingTrivia: .space), |
Member
There was a problem hiding this comment.
Leading trivia is empty by default so we don’t need to specify it.
Contributor
Author
|
Thank you for the review! I have removed the leading trivia! |
ahoppen
approved these changes
May 7, 2026
Member
|
@swift-ci Please test |
Contributor
Author
|
Thanks for merging! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes formatting issue where the refactored computed property was generating a leading space before the type annotation colon (e.g.,
var x :Intinstead ofvar x: Int).The fix removes the
trailingTriviafrom the variable's pattern that was previously associated with the equals sign.Context
Related to #3249.
Addresses feedback from swiftlang/sourcekit-lsp#2622