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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ let syntaxExpressibleByStringInterpolationConformancesFile = SourceFileSyntax(le
"""
#if compiler(>=6)
extension \(type): Swift.ExpressibleByStringInterpolation {}
// Work around https://github.com/swiftlang/swift/issues/85153 by restating the implicit conformances.
extension \(type): Swift.ExpressibleByStringLiteral, Swift.ExpressibleByExtendedGraphemeClusterLiteral, Swift.ExpressibleByUnicodeScalarLiteral {}
#endif
"""
)
Expand Down
10 changes: 10 additions & 0 deletions Sources/SwiftSyntaxBuilder/Syntax+StringInterpolation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,10 @@ extension TokenSyntax: SyntaxExpressibleByStringInterpolation {
// Silence warning that TokenSyntax has a retroactive conformance to `ExpressibleByStringInterpolation` through
// `SyntaxExpressibleByStringInterpolation`.
extension TokenSyntax: Swift.ExpressibleByStringInterpolation {}
// Work around https://github.com/swiftlang/swift/issues/85153 by restating the implicit conformances.
extension TokenSyntax: Swift.ExpressibleByStringLiteral {}
extension TokenSyntax: Swift.ExpressibleByExtendedGraphemeClusterLiteral {}
extension TokenSyntax: Swift.ExpressibleByUnicodeScalarLiteral {}
#endif

// MARK: - Trivia expressible as string
Expand Down Expand Up @@ -515,7 +519,13 @@ extension Trivia {
}

#if compiler(>=6)
// Silence warning that Trivia has a retroactive conformance to `ExpressibleByStringInterpolation` through
// `SyntaxExpressibleByStringInterpolation`.
extension Trivia: Swift.ExpressibleByStringInterpolation {}
// Work around https://github.com/swiftlang/swift/issues/85153 by restating the implicit conformances.
extension Trivia: Swift.ExpressibleByStringLiteral {}
extension Trivia: Swift.ExpressibleByExtendedGraphemeClusterLiteral {}
extension Trivia: Swift.ExpressibleByUnicodeScalarLiteral {}
#else
extension Trivia: ExpressibleByStringInterpolation {}
#endif

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.