We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d4fb6f commit 4d50e5fCopy full SHA for 4d50e5f
tests/pos/i23095/defs.scala
@@ -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
@@ -0,0 +1,3 @@
+given SeqStringCodec[Int] = ???
+given SeqStringCodec[String] = ???
+final case class Form(int: Int, string: String) derives FormCodec
0 commit comments