diff --git a/compiler/src/dotty/tools/dotc/inlines/Inlines.scala b/compiler/src/dotty/tools/dotc/inlines/Inlines.scala index 4860913bdc63..c6906a0dbf0a 100644 --- a/compiler/src/dotty/tools/dotc/inlines/Inlines.scala +++ b/compiler/src/dotty/tools/dotc/inlines/Inlines.scala @@ -443,6 +443,9 @@ object Inlines: unrollTupleTypes(tail).map(head :: _) case tpe: TermRef if tpe.symbol == defn.EmptyTupleModule => Some(Nil) + case tpRef: TypeRef => tpRef.info match + case MatchAlias(alias) => unrollTupleTypes(alias.tryNormalize) + case _ => None case _ => None diff --git a/tests/pos/i19385.scala b/tests/pos/i19385.scala new file mode 100644 index 000000000000..0f66a15c13bc --- /dev/null +++ b/tests/pos/i19385.scala @@ -0,0 +1,8 @@ +import scala.compiletime.summonAll + +inline def f[M <: Tuple]: Unit = + type Alias = Tuple.Map[M, [X] =>> Numeric[X]] + summonAll[Tuple.Map[M, [X] =>> Numeric[X]]] // compiles + summonAll[Alias] // error: Tuple element types must be known at compile time + +val y1 = f[(Int, Int)] \ No newline at end of file