Skip to content

Commit

Permalink
workaround ?
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Aug 20, 2024
1 parent 3f127ed commit 87e426f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ private[record4s] class InternalMacros(using

private def isTuple(tpr: TypeRepr): Boolean =
tpr.asType match {
case '[_ *: _] => true
case _ => false
case '[x1 *: x2] => true
case _ => false
}

private def isOpaqueAlias(tpr: TypeRepr): Boolean =
Expand Down Expand Up @@ -427,7 +427,7 @@ private[record4s] class InternalMacros(using

def schemaOf[R: Type]: Schema = {
def isTuple[T: Type]: Boolean = Type.of[T] match {
case '[_ *: _] => true
case '[x1 *: x2] => true
case '[EmptyTuple] => true
case _ => false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ object RecordLike {
new OfProduct

type LabelsOf[T <: Tuple] <: Tuple = T match {
case (l, _) *: tail => l *: LabelsOf[tail]
case (l, a) *: tail => l *: LabelsOf[tail]
case head *: tail => LabelsOf[tail]
case _ => EmptyTuple
}

type TypesOf[T] <: Tuple = T match {
case (_, t) *: tail => t *: TypesOf[tail]
case (a, t) *: tail => t *: TypesOf[tail]
case head *: tail => TypesOf[tail]
case _ => EmptyTuple
}
Expand Down

0 comments on commit 87e426f

Please sign in to comment.