final class MyType<T: Comparable, each U: Comparable, V: Comparable> {
typealias Data = (T, repeat each U, V)
typealias NextNode = MyType<repeat each U, V, T>
//...
}
On the third line, the occurrence of "MyType" is marked with an error:
Generic type 'MyType' specialized with mismatched type parameter pack
I want the next step to be shifted over by 1. What's going on?
I expect the compiler to explode U to its separate terms, then have NextNode recalculate its generic parameters. If U is empty, then NextNode.T will be V and NextNode.V will be T. Otherwise, the first term of U will become NextNode.T, T will become NextNode.V and NextNode.U will be the non-first terms of U followed by V.