Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Sources/SwiftBasicFormat/BasicFormat.swift
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ open class BasicFormat: SyntaxRewriter {
(.identifier, .leftSquare), // myArray[1]
(.identifier, .period), // a.b
(.integerLiteral, .period), // macOS 11.2.1
(.keyword(.Any), .period), // Any.Type
(.keyword(.`init`), .leftAngle), // init<T>()
(.keyword(.`init`), .leftParen), // init()
(.keyword(.self), .period), // self.someProperty
Expand Down
13 changes: 13 additions & 0 deletions Tests/SwiftSyntaxBuilderTest/VariableTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -371,4 +371,17 @@ final class VariableTests: XCTestCase {
assertBuildResult(builder, expected, line: line)
}
}

// https://github.com/apple/swift-syntax/issues/1815
func testSpacingInDictionaryType() throws {
let buildable = try VariableDeclSyntax("static var mirror: Dictionary<String, Any.Type>") {}

assertBuildResult(
buildable,
"""
static var mirror: Dictionary<String, Any.Type> {
}
"""
)
}
}