Skip to content

Commit

Permalink
use simple typeable for simple case classes
Browse files Browse the repository at this point in the history
  • Loading branch information
dwickern committed Jun 11, 2024
1 parent f4af2e6 commit 35f6eac
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,10 @@ object TypeableMacros:
val owner = normalizeModuleClass(sym.owner)

qual match
case Some(_) if sym.flags.is(Flags.Case) => mkCaseClassTypeable
case None => mkNamedSimpleTypeable
case Some(tp: TypeRef) if normalizeModuleClass(tp.typeSymbol) == owner => mkNamedSimpleTypeable
case Some(tp: TermRef) if normalizeModuleClass(tp.termSymbol) == owner => mkNamedSimpleTypeable
case Some(_) if sym.flags.is(Flags.Case) => mkCaseClassTypeable
case Some(_) if sym.flags.is(Flags.Sealed) => mkSumTypeable
case _ => report.errorAndAbort(s"No Typeable for type ${target.show} with a dependent prefix")

Expand Down

0 comments on commit 35f6eac

Please sign in to comment.