Skip to content

Commit 4ad0c8f

Browse files
Merge pull request #12831 from dotty-staging/fix-#12474
Fix #12474: add regression test
2 parents 000a541 + e4eb186 commit 4ad0c8f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/pos/i12474.scala

+17
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)