Skip to content

Commit 7d0ceb8

Browse files
authored
Merge pull request #977 from owenv/owenv/send
PolymorphicSerializable types should have Sendable metatypes
2 parents 3f056e1 + be6c049 commit 7d0ceb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SWBUtil/Serialization.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ extension PendingSerializableCodable {
684684
/// Elements of these types will be wrapped in a `PolymorphicSerializableWrapper` struct to be serialized. They should never be serialized directly (which is why this protocol does not adopt `Serializable`).
685685
///
686686
/// `PolymorphicSerializable` does not support serializing multiple types of a given protocol, because deserialization cannot infer the type to instantiate if all it has to work with is the protocol. A class hierarchy should be used instead.
687-
public protocol PolymorphicSerializable
687+
public protocol PolymorphicSerializable: SendableMetatype
688688
{
689689
/// Serialize the receiver.
690690
func serialize<T: Serializer>(to serializer: T)

0 commit comments

Comments
 (0)