That’s not surprising. Sendable
is a marker protocol, which means it has no runtime presence, which means that a runtime type check isn’t feasible.
I’ve never seen folks bump into this before because a key goal of Swift concurrency is to have the compiler validate your concurrency at build time. Checking stuff at runtime kinda runs counter to that goal.
I don’t think there’s an obvious path forward here. I suspect you’ll have to take a step back and look at some bigger picture options, like converting this parameter to a generic or adding another routine that takes any Sendable
.
If you can provide more details about the big picture, I’d be happy to offer further advice.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"