Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docs/_docs/reference/contextual/derivation-macro.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,8 @@ object Eq:
case _ => '{ summonInline[Eq[Elem]] }

def deriveRec[T: Type, Elem: Type](using Quotes): Expr[Eq[Elem]] =
import quotes.reflect.*
Type.of[T] match
case '[Elem] => report.errorAndAbort("infinite recursive derivation")
case '[Elem] => '{ error("infinite recursive derivation") }
case _ => derivedMacro[Elem] // recursive derivation

inline def derived[T]: Eq[T] = ${ derivedMacro[T] }
Expand Down