Without making this change, compiling the default XCTestCase created for a macro project under Swift 6 will produce the error “Let testMacros is not concurrency-safe because non-Sendable type [String : MacroSpec] may have shared mutable state.” Fortunately there is no shared mutable state here — syntax nodes are already Sendable, and metatypes are also Sendable.
Without making this change, compiling the default
XCTestCase
created for a macro project under Swift 6 will produce the error “LettestMacros
is not concurrency-safe because non-Sendable
type[String : MacroSpec]
may have shared mutable state.” Fortunately there is no shared mutable state here — syntax nodes are alreadySendable
, and metatypes are alsoSendable
.