We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d39d425 commit 93e238fCopy full SHA for 93e238f
CodeGeneration/Sources/SyntaxSupport/Node.swift
@@ -98,7 +98,13 @@ public class Node {
98
public func apiAttributes(forRaw: Bool = false) -> AttributeListSyntax {
99
let attrList = AttributeListSyntax {
100
if isExperimental {
101
- "@_spi(ExperimentalLanguageFeatures)"
+ // SPI for enum cases currently requires Swift 5.8 to work correctly.
102
+ let experimentalSPI: AttributeListSyntax = """
103
+ #if compiler(>=5.8)
104
+ @_spi(ExperimentalLanguageFeatures)
105
+ #endif
106
+ """
107
+ experimentalSPI.with(\.trailingTrivia, .newline)
108
}
109
if forRaw {
110
"@_spi(RawSyntax)"
0 commit comments