File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Tests/SwiftSyntaxBuilderTest Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,7 @@ open class BasicFormat: SyntaxRewriter {
205205 ( . identifier, . leftSquareBracket) , // myArray[1]
206206 ( . identifier, . period) , // a.b
207207 ( . integerLiteral, . period) , // macOS 11.2.1
208+ ( . keyword( . Any) , . period) , // Any.Type
208209 ( . keyword( . `init`) , . leftAngle) , // init<T>()
209210 ( . keyword( . `init`) , . leftParen) , // init()
210211 ( . keyword( . self ) , . period) , // self.someProperty
Original file line number Diff line number Diff line change @@ -349,4 +349,17 @@ final class VariableTests: XCTestCase {
349349 assertBuildResult ( builder, expected, line: line)
350350 }
351351 }
352+
353+ // https://github.com/apple/swift-syntax/issues/1815
354+ func testSpacingInDictionaryType( ) throws {
355+ let buildable = try VariableDeclSyntax ( " static var mirror: Dictionary<String, Any.Type> " ) { }
356+
357+ assertBuildResult (
358+ buildable,
359+ """
360+ static var mirror: Dictionary<String, Any.Type> {
361+ }
362+ """
363+ )
364+ }
352365}
You can’t perform that action at this time.
0 commit comments