If I have a generic type parameter called Clock
, how can I express that this type should implement Swift's Clock
protocol? It's not clear to me what's the correct way to qualify the type name, given that Swift.Clock
does not exist, and I assume, given the underscore, that I shouldn't be writing _Concurrency.Clock
.
Thank you!
1 Like
Given that module interface files refer to the _Concurrency
module, any source breakage of this kind would be staged over a period of time.
1 Like
If you are worried about the underscore, in a separate file within your project you can define your own type alias of Clock
—for example:
typealias ConcurrencyClock /* or whatever you want to call it */ = Clock
You can then use that alias everywhere in your project.
1 Like
Good point, I hadn't thought of that!