Skip to content

Commit

Permalink
Add back runtime check for scala 3
Browse files Browse the repository at this point in the history
  • Loading branch information
RustedBones committed Nov 7, 2023
1 parent f4df19e commit a9184f8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import magnolia1.{CaseClass, Derivation, SealedTrait}
trait EnumTypeDerivation extends Derivation[EnumType]:

def join[T](caseClass: CaseClass[EnumType, T]): EnumType[T] =
// fail at runtime since we can't prevent derivation
// see https://github.com/softwaremill/magnolia/issues/267
require(caseClass.isObject, s"Cannot derive EnumType[T] for case class ${caseClass.typeInfo}")
val n = caseClass.typeInfo.short
val ns = caseClass.typeInfo.owner
EnumType.create(
Expand Down

0 comments on commit a9184f8

Please sign in to comment.