File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Tests/SwiftSyntaxBuilderTest Expand file tree Collapse file tree 2 files changed +17
-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,20 @@ 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 header = PartialSyntaxNodeString ( stringLiteral: " static var mirror: Dictionary<String, Any.Type> " )
378
+ let buildable = try VariableDeclSyntax ( header) {
379
+
380
+ }
381
+
382
+ assertBuildResult (
383
+ buildable,
384
+ """
385
+ static var mirror: Dictionary<String, Any.Type> {
386
+ }
387
+ """
388
+ )
389
+ }
374
390
}
You can’t perform that action at this time.
0 commit comments