Skip to content

Commit e4eb186

Browse files
Fix #12474: add regression test
1 parent 076ab0a commit e4eb186

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/pos/i12474.scala

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package bugreport
2+
3+
import scala.compiletime.erasedValue
4+
5+
trait Show[A]:
6+
def show(a: A): String
7+
8+
inline def showTuple[Types]: Show[Types] =
9+
inline erasedValue[Types] match
10+
case _: (head *: tail) =>
11+
val instance =
12+
new Show[head *: tail]:
13+
def show(tuple: head *: tail): String = "dummy"
14+
instance.asInstanceOf[Show[Types]]
15+
16+
@main def run() =
17+
showTuple[(Int, Int)]

0 commit comments

Comments
 (0)