Closed
Description
Minimized code
type inserts[a, as <: Tuple] <: Tuple =
as match
case EmptyTuple => (a *: EmptyTuple) *: EmptyTuple
case y *: ys => (a *: y *: ys) *: Tuple.Map[inserts[a, ys], [t <: Tuple] =>> y *: t]
type inserts2[a] =
[as <: Tuple] =>> inserts[a, as]
type A = inserts [1, EmptyTuple]
type B = inserts2[1][EmptyTuple]
summon[A =:= ((1 *: EmptyTuple) *: EmptyTuple)]
summon[B =:= ((1 *: EmptyTuple) *: EmptyTuple)]
summon[A =:= B]
type H[t <: Tuple] = Tuple.Concat[t, EmptyTuple]
summon[H[A] =:= H[B]]
// error!
summon[Tuple.Concat[A, EmptyTuple] =:= Tuple.Concat[B, EmptyTuple]]
Output
// Cannot prove that ((1 : Int) *: EmptyTuple) *: EmptyTuple =:= Tuple.Concat[B, EmptyTuple]
Expectation
The snippet should compile.
(it compiles in 3.0.0-M2
but not in 3.0.0-M3
)