Skip to content

Commit 5e7bfb2

Browse files
authored
avoid reflect API in error (#17420)
small change I forgot to copy over
1 parent bd9e0f7 commit 5e7bfb2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/_docs/reference/contextual/derivation-macro.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,8 @@ object Eq:
160160
case _ => '{ summonInline[Eq[Elem]] }
161161

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

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

0 commit comments

Comments
 (0)