Skip to content

Commit

Permalink
fix annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
mrs1669 committed Mar 28, 2024
1 parent d4bbe76 commit af84165
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public final class AlwaysUseLiteralForEmptyCollectionInit : SyntaxFormatRule {
if replacement.typeAnnotation == nil {
// Drop trailing trivia after pattern because ':' has to appear connected to it.
replacement.pattern = node.pattern.with(\.trailingTrivia, [])
// Add explicit type annotiation: ': [<Type>]`
// Add explicit type annotation: ': [<Type>]`
replacement.typeAnnotation = .init(type: type.with(\.leadingTrivia, .space)
.with(\.trailingTrivia, .space))
}
Expand All @@ -109,7 +109,7 @@ public final class AlwaysUseLiteralForEmptyCollectionInit : SyntaxFormatRule {
if replacement.typeAnnotation == nil {
// Drop trailing trivia after pattern because ':' has to appear connected to it.
replacement.pattern = node.pattern.with(\.trailingTrivia, [])
// Add explicit type annotiation: ': [<Type>]`
// Add explicit type annotation: ': [<Type>]`
replacement.typeAnnotation = .init(type: type.with(\.leadingTrivia, .space)
.with(\.trailingTrivia, .space))
}
Expand Down

0 comments on commit af84165

Please sign in to comment.