Skip to content

Commit 7c13450

Browse files
EugeneFlesselleWojciechMazur
authored andcommitted
Add regression test for #20288 fixed in #20527
Close #20288 [Cherry-picked 5becb63]
1 parent 8d7892a commit 7c13450

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/pos/i20288.scala

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
trait Decoder[A]
3+
object Decoder {
4+
given Decoder[DataRow] = ???
5+
extension [A <: Tuple](d: Decoder[A])
6+
def ~[B](fd: Field[B]): Decoder[Tuple.Concat[A, Tuple1[B]]] = ???
7+
}
8+
9+
trait Field[A]
10+
object Field:
11+
val int: Field[Int] = ???
12+
extension [A](self: Field[A])
13+
def ~[B](that: Field[B])(using Decoder[DataRow]): Decoder[(A, B)] = ???
14+
15+
trait DataRow
16+
def simpleQuery[S, A](query: String)(using Decoder[A]): Either[Throwable, A] = ???
17+
18+
@main def Test = {
19+
import Decoder.*
20+
val fails = simpleQuery("")(using
21+
Field.int ~ Field.int ~ Field.int
22+
)
23+
}

0 commit comments

Comments
 (0)