In the example, I use use a typealias to override an associated type instead of a type constraint. It allows me to omit the typealias in the concrete type conforming to the protocol (the last declaration). If I use a same-type constraint as the warning suggests, then I have to explicitly declare the typealias in the concrete type, otherwise the compiler will complain that SpecificEndpoint doesn’t implement StandardEndpoint.
- I think this is a valid use-case, am I missing anything?
- If it is, indeed, a valid use-case, is there anything I can do to silence the warning?
- Should the compiler infer the typealias when using a same-type constraint?