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 {
206
206
( . identifier, . leftSquare) , // myArray[1]
207
207
( . identifier, . period) , // a.b
208
208
( . integerLiteral, . period) , // macOS 11.2.1
209
+ ( . keyword( . Any) , . period) , // Any.Type
209
210
( . keyword( . `init`) , . leftAngle) , // init<T>()
210
211
( . keyword( . `init`) , . leftParen) , // init()
211
212
( . keyword( . self ) , . period) , // self.someProperty
Original file line number Diff line number Diff line change @@ -371,4 +371,17 @@ final class VariableTests: XCTestCase {
371
371
assertBuildResult ( builder, expected, line: line)
372
372
}
373
373
}
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
+ }
374
387
}
You can’t perform that action at this time.
0 commit comments