diff --git a/tests/pos/i12474.scala b/tests/pos/i12474.scala new file mode 100644 index 000000000000..41762fba55c1 --- /dev/null +++ b/tests/pos/i12474.scala @@ -0,0 +1,17 @@ +package bugreport + +import scala.compiletime.erasedValue + +trait Show[A]: + def show(a: A): String + +inline def showTuple[Types]: Show[Types] = + inline erasedValue[Types] match + case _: (head *: tail) => + val instance = + new Show[head *: tail]: + def show(tuple: head *: tail): String = "dummy" + instance.asInstanceOf[Show[Types]] + +@main def run() = + showTuple[(Int, Int)]