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