Confused by generic behaviour, not clear if it is a bug

Well diagnostics are written by some people and I think it's fair to say that it's impossible to come up with perfect diagnostics for everything, there are also edge cases that no one thought about. However it is true that the diagnostics here could be better. I have no experience in compiler development, so I cannot contribute here (still on my ToDo-list to dive into that topic). Even I found weird or wrong diagnostics in places where it didn't make any sense. If you don't research intensively then how would you solve issues like SR-631 where you simply expect it to work?!

And if I may recall, the old syntax for APoroto & BProto was protocol<AProto, BProto> which implies that the existential is simply like an anonymous protocol that includes AProto and BProto. And here we're circling back to this thread where I discussed how this issue could be solved if only we had better metatypes. (I'll bring that topic back very soon, I promise.)


A side note for curious people:

The following syntax is a glitch in Swift 4.x which was caused by allowing classes in existentials like AClass & AProto:

protocol SomeName where Self : SomeClass /* glitch */ { ... } 

In the future when this feature is fully supported it will become protocol SomeName : SomeClass { ... }

I'm sharing this because if you understand the old syntax protocol<A, B> then you should be able to get the idea why where Self : SomeClass happend.