Ah, so the problem isn’t that the language doesn’t have the type membership test you’re looking for, but rather that it doesn’t work on protocols with associated types. It does seem like is
should work here! That seems like a good proposal.
(It makes sense that as?
wouldn’t work, because the language still can’t use one of these associated type protocols as the type of a variable.)