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 @@ -206,6 +206,7 @@ open class BasicFormat: SyntaxRewriter {
206206 ( . identifier, . leftSquare) , // myArray[1]
207207 ( . identifier, . period) , // a.b
208208 ( . integerLiteral, . period) , // macOS 11.2.1
209+ ( . keyword( . Any) , . period) , // Any.Type
209210 ( . keyword( . `init`) , . leftAngle) , // init<T>()
210211 ( . keyword( . `init`) , . leftParen) , // init()
211212 ( . keyword( . self ) , . period) , // self.someProperty
Original file line number Diff line number Diff line change @@ -371,4 +371,17 @@ final class VariableTests: XCTestCase {
371371 assertBuildResult ( builder, expected, line: line)
372372 }
373373 }
374+
375+ // https://github.com/apple/swift-syntax/issues/1815
376+ func testSpacingInDictionaryType( ) throws {
377+ let buildable = try VariableDeclSyntax ( " static var mirror: Dictionary<String, Any.Type> " ) { }
378+
379+ assertBuildResult (
380+ buildable,
381+ """
382+ static var mirror: Dictionary<String, Any.Type> {
383+ }
384+ """
385+ )
386+ }
374387}
You can’t perform that action at this time.
0 commit comments