Skip to content

Commit a9920b0

Browse files
authored
Merge pull request #463 from scala/backport-lts-3.3-23359
Backport "Test case for regression scala#23095" to 3.3 LTS
2 parents 358d1df + 235b82a commit a9920b0

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)