File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
docs/docs/reference/contextual Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ have the given instances for our primitive types:
9595 case ' [String *: $tpes] => ' { summon[Eq [String ]] } :: summonAll(tpes)
9696 case ' [Int *: $tpes] => ' { summon[Eq [Int ]] } :: summonAll(tpes)
9797 case ' [$tpe *: $tpes] => derived(using tpe, qctx) :: summonAll(tpes)
98- case ' [Unit ] => Nil
98+ case ' [EmptyTuple ] => Nil
9999 }
100100```
101101
@@ -173,7 +173,7 @@ object Eq {
173173 case ' [String *: $tpes] => ' { summon[Eq [String ]] } :: summonAll(tpes)
174174 case ' [Int *: $tpes] => ' { summon[Eq [Int ]] } :: summonAll(tpes)
175175 case ' [$tpe *: $tpes] => derived(using tpe, qctx) :: summonAll(tpes)
176- case ' [Unit ] => Nil
176+ case ' [EmptyTuple ] => Nil
177177 }
178178
179179 given derived [T : Type ](using qctx : QuoteContext ) as Expr [Eq [T ]] = {
@@ -222,4 +222,4 @@ object Macro3 {
222222
223223 implicit inline def eqGen [T ]: Eq [T ] = $ { Eq .derived[T ] }
224224}
225- ```
225+ ```
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ implementation of `summonAll` is `inline` and uses Dotty's `summonInline` constr
200200``` scala
201201
202202inline def summonAll [T <: Tuple ]: List [Eq [_]] = inline erasedValue[T ] match {
203- case _ : Unit => Nil
203+ case _ : EmptyTuple => Nil
204204 case _ : (t *: ts) => summonInline[Eq [t]] :: summonAll[ts]
205205}
206206```
@@ -244,7 +244,7 @@ import scala.deriving._
244244import scala .compiletime .{erasedValue , summonInline }
245245
246246inline def summonAll [T <: Tuple ]: List [Eq [_]] = inline erasedValue[T ] match {
247- case _ : Unit => Nil
247+ case _ : EmptyTuple => Nil
248248 case _ : (t *: ts) => summonInline[Eq [t]] :: summonAll[ts]
249249}
250250
You can’t perform that action at this time.
0 commit comments