-
Notifications
You must be signed in to change notification settings - Fork 32
Proposal: make FHIRPrimitiveType inherit Sendable #38
Description
i'd like to propose the FHIRPrimitiveType protocol be rewritten to the following:
public protocol FHIRPrimitiveType: FHIRType, Sendable, SendableMetatype {}(it is currently defined to inherit just from FHIRType.)
since all types that conform to FHIRPrimitiveType are, as the name already suggests, "primitive" types, they will all trivially be able to conform to Sendable.
in fact, all types conforming to FHIRPrimitiveType currently already are capable of being Sendable (though only some of them actually state this as an explicit conformance; changing all six definitions of FHIRPrimitiveType (across the different targets) to the definition above does not require any additional changes to keep the package compiling, and all tests continue to pass without issues.
additionally, as part of this change, we should also add a SendableMetatype conformance, to make it easier to use these types in generic contexts.