Skip to content

Commit be60f78

Browse files
authored
Merge pull request #1088 from bnbarham/revert-type-group
Remove added group around base type in `AttributedTypeSyntax`
2 parents f45ca4f + d022b8b commit be60f78

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

Sources/SwiftFormat/PrettyPrint/TokenStreamCreator.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2411,9 +2411,6 @@ private final class TokenStreamCreator: SyntaxVisitor {
24112411
)
24122412
}
24132413

2414-
before(node.baseType.firstToken(viewMode: .sourceAccurate), tokens: .open)
2415-
after(node.baseType.lastToken(viewMode: .sourceAccurate), tokens: .close)
2416-
24172414
after(node.lastToken(viewMode: .sourceAccurate), tokens: .close)
24182415
return .visitChildren
24192416
}

Tests/SwiftFormatTests/PrettyPrint/FunctionTypeTests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,15 +316,15 @@ final class FunctionTypeTests: PrettyPrintTestCase {
316316
expected: """
317317
func f(
318318
_ body:
319-
nonisolated(nonsending)
320-
() async -> Void
319+
nonisolated(nonsending) ()
320+
async -> Void
321321
) {}
322322
323323
func f(
324324
_ body:
325325
@Foo @Bar
326-
nonisolated(nonsending)
327-
() async -> Void
326+
nonisolated(nonsending) ()
327+
async -> Void
328328
) {}
329329
330330
func f(
@@ -336,8 +336,8 @@ final class FunctionTypeTests: PrettyPrintTestCase {
336336
func f(
337337
_ body:
338338
inout @Foo @Bar
339-
nonisolated(nonsending)
340-
() async -> Void
339+
nonisolated(nonsending) ()
340+
async -> Void
341341
) {}
342342
343343
""",

0 commit comments

Comments
 (0)