Skip to content

Commit 3c085f0

Browse files
authored
Fix: generated protocols should also implement Sendable (#68)
1 parent c084339 commit 3c085f0

File tree

11 files changed

+15
-14
lines changed

11 files changed

+15
-14
lines changed

codegen/snippet-tests/output/Classes.pkl.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public protocol Classes_Person: Classes_Being {
1313
var things: Set<Int> { get }
1414
}
1515

16-
public protocol Classes_Being: PklRegisteredType, DynamicallyEquatable, Hashable {
16+
public protocol Classes_Being: PklRegisteredType, DynamicallyEquatable, Hashable, Sendable {
1717
var isAlive: Bool { get }
1818
}
1919

@@ -25,7 +25,7 @@ public protocol Classes_B: Classes_A {
2525
var b: String { get }
2626
}
2727

28-
public protocol Classes_A: PklRegisteredType, DynamicallyEquatable, Hashable {
28+
public protocol Classes_A: PklRegisteredType, DynamicallyEquatable, Hashable, Sendable {
2929
var a: String { get }
3030
}
3131

codegen/snippet-tests/output/EmptyOpenModule.pkl.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PklSwift
33

44
public enum EmptyOpenModule {}
55

6-
public protocol EmptyOpenModule_Module: PklRegisteredType, DynamicallyEquatable, Hashable {
6+
public protocol EmptyOpenModule_Module: PklRegisteredType, DynamicallyEquatable, Hashable, Sendable {
77
}
88

99
extension EmptyOpenModule {

codegen/snippet-tests/output/ExtendingOpenClass.pkl.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PklSwift
33

44
public enum ExtendingOpenClass {}
55

6-
public protocol ExtendingOpenClass_MyOpenClass: PklRegisteredType, DynamicallyEquatable, Hashable {
6+
public protocol ExtendingOpenClass_MyOpenClass: PklRegisteredType, DynamicallyEquatable, Hashable, Sendable {
77
var myStr: String { get }
88
}
99

codegen/snippet-tests/output/ExtendsAbstractClass.pkl.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PklSwift
33

44
public enum ExtendsAbstractClass {}
55

6-
public protocol ExtendsAbstractClass_A: PklRegisteredType, DynamicallyEquatable, Hashable {
6+
public protocol ExtendsAbstractClass_A: PklRegisteredType, DynamicallyEquatable, Hashable, Sendable {
77
var b: String { get }
88
}
99

codegen/snippet-tests/output/Foo.pkl.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public protocol Foo_Animal: Foo_Being {
77
var name: String { get }
88
}
99

10-
public protocol Foo_Being: PklRegisteredType, DynamicallyEquatable, Hashable {
10+
public protocol Foo_Being: PklRegisteredType, DynamicallyEquatable, Hashable, Sendable {
1111
var exists: Bool { get }
1212
}
1313

codegen/snippet-tests/output/MyModule.pkl.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PklSwift
33

44
public enum MyModule {}
55

6-
public protocol MyModule_Module: PklRegisteredType, DynamicallyEquatable, Hashable {
6+
public protocol MyModule_Module: PklRegisteredType, DynamicallyEquatable, Hashable, Sendable {
77
var foo: String { get }
88
}
99

codegen/snippet-tests/output/Override2.pkl.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PklSwift
33

44
public enum Override2 {}
55

6-
public protocol Override2_Module: PklRegisteredType, DynamicallyEquatable, Hashable {
6+
public protocol Override2_Module: PklRegisteredType, DynamicallyEquatable, Hashable, Sendable {
77
var foo: String { get }
88
}
99

codegen/snippet-tests/output/com_example_Simple.pkl.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import PklSwift
33

44
public enum com_example_Simple {}
55

6-
public protocol com_example_Simple_Person: PklRegisteredType, DynamicallyEquatable, Hashable {
6+
public protocol com_example_Simple_Person: PklRegisteredType, DynamicallyEquatable, Hashable, Sendable {
77
var theName: String { get }
88

99
var `enum`: String { get }
1010
}
1111

12-
public protocol com_example_Simple_OpenClassExtendingOpenClass: PklRegisteredType, DynamicallyEquatable, Hashable {
12+
public protocol com_example_Simple_OpenClassExtendingOpenClass: PklRegisteredType, DynamicallyEquatable, Hashable, Sendable {
1313
var someOtherProp: Bool? { get }
1414
}
1515

codegen/snippet-tests/output/lib3.pkl.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PklSwift
33

44
public enum lib3 {}
55

6-
public protocol lib3_GoGoGo: PklRegisteredType, DynamicallyEquatable, Hashable {
6+
public protocol lib3_GoGoGo: PklRegisteredType, DynamicallyEquatable, Hashable, Sendable {
77
var duck: String { get }
88
}
99

codegen/snippet-tests/output/override.pkl.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PklSwift
33

44
public enum override {}
55

6-
public protocol override_Foo: PklRegisteredType, DynamicallyEquatable, Hashable {
6+
public protocol override_Foo: PklRegisteredType, DynamicallyEquatable, Hashable, Sendable {
77
var myProp: String { get }
88
}
99

0 commit comments

Comments
 (0)