That cyclical referencing looks very scary, I think you can better express that requirement as:
class Some<A, B> {
enum U { case a(A), b(B) }
typealias M = Either<A, U>
}
You need to fully specify the generic placeholders to identify nested types. So you need M (and A, B) to define U, then you need U to constrain M. I'm not even sure how that's suppose to work.
My initial intuition was that it is a process with two steps, first of which is an inference of A and B and second is a reference to Self.U, that is gonna be parametrized.
Would like to know whose flaw it is: mine or the language's.
Alright, thank you for feedback.
ps. It is interesting that even though the nested type signature does not dependent on a parent type signature, it is still treated as contravariant. Is that a correct behaviour?