mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Introduce a marker protocol SendableMetatype that is used to indicate when the metatype of a type will conform to Sendable. Specifically, `T: SendableMetatype` implies `T.Type: Sendable`. When strict metatype sendability is enabled, metatypes are only sendable when `T: SendableMetatype`. All nominal types implicitly conform to `SendableMetatype`, as do the various builtin types, function types, etc. The `Sendable` marker protocol now inherits from `SendableMetatype`, so that `T: Sendable` implies `T.Type: Sendable`. Thank you Slava for the excellent idea!