Skip to content

Commit 72f59a2

Browse files
committed
Add a SendableMetatype conformance to Macro
`Macro.Type` is used in various `Error`s and since SE-0470, needs to conform to `SendableMetatype`.
1 parent 29fd4cc commit 72f59a2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/SwiftSyntaxMacros/MacroProtocols/Macro.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
/// Describes a macro.
14-
public protocol Macro {
14+
public protocol Macro: SendableMetatype {
1515
/// How the resulting expansion should be formatted, `.auto` by default.
1616
/// Use `.disabled` for the expansion to be used as is.
1717
static var formatMode: FormatMode { get }
1818
}
19+
20+
#if compiler(<6.2)
21+
public typealias SendableMetatype = Any
22+
#endif

0 commit comments

Comments
 (0)