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 4e41a4c commit 426a3d1Copy full SHA for 426a3d1
docs/_docs/reference/contextual/derivation-macro.md
@@ -49,7 +49,7 @@ given derived[T: Type](using Quotes): Expr[Eq[T]] =
49
ev match
50
case '{ $m: Mirror.ProductOf[T] { type MirroredElemTypes = elementTypes }} =>
51
val elemInstances = summonAll[elementTypes]
52
- val eqProductBody: (Expr[T], Expr[T]) => Expr[Boolean] = (x, y) =>
+ def eqProductBody(Expr[T], Expr[T])(using Quotes): Expr[Boolean] = (x, y) =>
53
elemInstances.zipWithIndex.foldLeft(Expr(true: Boolean)) {
54
case (acc, (elem, index)) =>
55
val e1 = '{$x.asInstanceOf[Product].productElement(${Expr(index)})}
0 commit comments