Closed
Description
Compiler version
3.2.2-RC2 (stopped working somewhere between 3.2.0 and 3.2.1)
Minimized code
import scala.deriving.Mirror
import scala.reflect.ClassTag
transparent inline given derived[A](
using m: Mirror.ProductOf[A],
idClassTag: ClassTag[Tuple.Union[m.MirroredElemTypes]]
): Unit = ???
case class Foo(a: Int)
val instance = derived[Foo]
Output
[error] ./test.scala:16:28: No ClassTag available for Tuple.Union[m.MirroredElemTypes]
[error]
[error] Note: a match type could not be fully reduced:
[error]
[error] trying to reduce Tuple.Union[m.MirroredElemTypes]
[error] trying to reduce scala.Tuple.Fold[m.MirroredElemTypes, Nothing, [x, y] =>> x | y]
[error] failed since selector m.MirroredElemTypes
[error] does not match case EmptyTuple => Nothing
[error] and cannot be shown to be disjoint from it either.
[error] Therefore, reduction cannot advance to the remaining case
[error]
[error] case h *: t => h | scala.Tuple.Fold[t, Nothing, [x, y] =>> x | y]
[error] val instance = derived[Foo]
[error]
Expectation
Should compile, like it did in 3.2.0