Skip to content

Commit

Permalink
Backport "Add regression test for #20288 fixed in #20527" to LTS (#21132
Browse files Browse the repository at this point in the history
)

Backports #20857 to the LTS branch.

PR submitted by the release tooling.
  • Loading branch information
WojciechMazur authored Jul 9, 2024
2 parents b71f89d + 739247b commit 1e31b17
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/pos/i20288.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

trait Decoder[A]
object Decoder {
given Decoder[DataRow] = ???
extension [A <: Tuple](d: Decoder[A])
def ~[B](fd: Field[B]): Decoder[Tuple.Concat[A, Tuple1[B]]] = ???
}

trait Field[A]
object Field:
val int: Field[Int] = ???
extension [A](self: Field[A])
def ~[B](that: Field[B])(using Decoder[DataRow]): Decoder[(A, B)] = ???

trait DataRow
def simpleQuery[S, A](query: String)(using Decoder[A]): Either[Throwable, A] = ???

@main def Test = {
import Decoder.*
val fails = simpleQuery("")(using
Field.int ~ Field.int ~ Field.int
)
}

0 comments on commit 1e31b17

Please sign in to comment.