Skip to content

Commit 4d50e5f

Browse files
authored
Test case for regression #23095 (#23359)
1 parent 7d4fb6f commit 4d50e5f

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

tests/pos/i23095/defs.scala

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import scala.compiletime.*
2+
import scala.deriving.*
3+
4+
trait SeqStringCodec[A]:
5+
def decode(value: Seq[String]): Either[Any, A]
6+
7+
trait UrlForm
8+
trait FormCodec[A]
9+
10+
object FormCodec {
11+
inline given derived[A](using p: Mirror.ProductOf[A]): FormCodec[A] =
12+
val codecs = summonAll[Tuple.Map[p.MirroredElemTypes, SeqStringCodec]].toArray
13+
val values = codecs.map {
14+
_.asInstanceOf[SeqStringCodec[?]]
15+
.decode(List.empty[String])
16+
}
17+
???
18+
}

tests/pos/i23095/test.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
given SeqStringCodec[Int] = ???
2+
given SeqStringCodec[String] = ???
3+
final case class Form(int: Int, string: String) derives FormCodec

0 commit comments

Comments
 (0)