diff --git a/Sources/SwiftFormat/PrettyPrint/TokenStreamCreator.swift b/Sources/SwiftFormat/PrettyPrint/TokenStreamCreator.swift index 46a805a2..f56f50e6 100644 --- a/Sources/SwiftFormat/PrettyPrint/TokenStreamCreator.swift +++ b/Sources/SwiftFormat/PrettyPrint/TokenStreamCreator.swift @@ -2411,9 +2411,6 @@ private final class TokenStreamCreator: SyntaxVisitor { ) } - before(node.baseType.firstToken(viewMode: .sourceAccurate), tokens: .open) - after(node.baseType.lastToken(viewMode: .sourceAccurate), tokens: .close) - after(node.lastToken(viewMode: .sourceAccurate), tokens: .close) return .visitChildren } diff --git a/Tests/SwiftFormatTests/PrettyPrint/FunctionTypeTests.swift b/Tests/SwiftFormatTests/PrettyPrint/FunctionTypeTests.swift index 2bb5b326..d7b7f30c 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/FunctionTypeTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/FunctionTypeTests.swift @@ -316,15 +316,15 @@ final class FunctionTypeTests: PrettyPrintTestCase { expected: """ func f( _ body: - nonisolated(nonsending) - () async -> Void + nonisolated(nonsending) () + async -> Void ) {} func f( _ body: @Foo @Bar - nonisolated(nonsending) - () async -> Void + nonisolated(nonsending) () + async -> Void ) {} func f( @@ -336,8 +336,8 @@ final class FunctionTypeTests: PrettyPrintTestCase { func f( _ body: inout @Foo @Bar - nonisolated(nonsending) - () async -> Void + nonisolated(nonsending) () + async -> Void ) {} """,