Open
Description
Compiler version
3.1.0
Code
The current definition for Tuple.Fold
is
type Fold[Tup <: Tuple, Z, F[_, _]] = ...
It should know that the result will be a subtype of Z
or F
. It looks like we should be able to add this bound but it does not work.
type Fold[Tup <: Tuple, Z, F[_, _]] <: (Z | F[_, _]) = ...
Failing example
type Reverse[X <: Tuple] <: Tuple = Fold[X, EmptyTuple, [A <: Tuple, Y] =>> Y *: A]
// [error] ^
// [error] cannot combine bound and alias
Expectation
Should be able to add these kinds of bounds