Test if a type conforms to a non-existential protocol

There is no way to cast, but if you’re willing to write a bunch of boilerplate there is a way to conditionally “open” an existential in a way that brings conformance back into the type system for the duration of a callback. Here’s an example areEquatablyEqual.swift · GitHub. This is super clunky and we should improve the language in this area, but it is possible as a workaround today.

3 Likes