Skip to content

Commit 40f497b

Browse files
Backport "Add regression tests" to LTS (#21066)
Backports #20177 to the LTS branch. PR submitted by the release tooling. [skip ci]
2 parents c4959a1 + cfcdbbb commit 40f497b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/pos/i19749.scala

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import scala.deriving.Mirror
2+
3+
case class A(x: Int, y: String)
4+
5+
trait SomeTrait[T]
6+
7+
object SomeTrait:
8+
given [T]: SomeTrait[T] with {}
9+
10+
def f1[T](using p: Mirror.ProductOf[T]): Tuple.Elem[p.MirroredElemTypes, 0] = ???
11+
12+
def f2[T, R](f: T => R)(using SomeTrait[R]) = ???
13+
14+
// Scala3.3 is fine, 3.4 has compilation errors, p MirroredElemTypes type is missing and has been changed to Nothing
15+
val x = f2(_ => f1[A])

0 commit comments

Comments
 (0)