SE-0302 (second review): Sendable and sendable closures

How will protocol inheritance be handled? Let's say I have:

protocol MyProtocol: Sendable {}

Is the following allowed?:

struct MyStruct: @unchecked MyProtocol {}

Or will explicit conformance to the Sendable protocol be required?:

struct MyStruct: MyProtocol, @unchecked Sendable {}

I think the latter is the clearest option.

Edit: I'm explicitly talking about the @unchecked option here. I'm assuming that without @unchecked, conforming to MyProtocol will just imply Sendable.

2 Likes