Are you speaking exclusively about redundancy to the right of the colon, or would you expect to be able to declare two separate conformances to Foo and Bar?
It’s not a bug or a feature, it’s two different code paths. The inheritance clause of a protocol is a shortcut for a series of Self: Foo requirements so redundancy is just ignored there. We could do the same for concrete types, I think the potential confusion from someone declaring a duplicate entry is low.
If this disparity is intentional - that's a feature, otherwise that's a bug, I can't see how it could be anything else. Could be the case that whoever implemented it didn't have the prescribed intended behaviour to match, and whatever we have now could be retroactively called the intended behaviour, in which case the current behaviour is "a feature".
Not that I see, no. Given that we allow this to be expressed in a where clause without issue it seems fine to me to allow it directly in the inheritance clause (particularly when it's incidental by way of two typealiases; IMO that the specific code in your example at top-of-thread gets diagnosed leans toward bug).
The latter probably is an error, because even though it's technically harmless it could mean the user meant to write "P2" for one of the conformances, or somesuch. There's also no good reason (that I can think of) for that syntax (I consider clumsy code generators not a good reason). It'd be wise to warn about it.
But for the former, those declarations can be spread widely apart within the code, might be complicated by the typealiases including - now, in the past, or in the future - other protocols as well, etc. It's simply less likely that it's an error. Conceptually A and B might be different things even if in practice they overlap or are even identical. And maybe they're not always identical, but it depends on some #ifs or somesuch, or they weren't identical in the past but became so but can't be removed or consolidated for backwards compatibility reasons, etc.
i.e. the compiler should really only be looking at the input text for this diagnostic, not caring about the semantics. Just checking for the same words in a single protocol list (whether that be ,-separated or &-separated).
I can get on board with this, except that I would add that I also think the diagnostic for when the same protocol is explicitly written twice should be downgraded to a warning.