Skip to content

Commit 1e31b17

Browse files
Backport "Add regression test for #20288 fixed in #20527" to LTS (#21132)
Backports #20857 to the LTS branch. PR submitted by the release tooling.
2 parents b71f89d + 739247b commit 1e31b17

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Diff for: 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)