From 42d05080f2b6a8034ec92da5119d0b82a7cc0503 Mon Sep 17 00:00:00 2001 From: Julien Tournay Date: Fri, 1 Jun 2018 16:34:21 +0200 Subject: Make instances Serializable --- core/shared/src/main/scala/interface.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/shared/src/main/scala/interface.scala b/core/shared/src/main/scala/interface.scala index 6eea9f1..af4fb51 100644 --- a/core/shared/src/main/scala/interface.scala +++ b/core/shared/src/main/scala/interface.scala @@ -21,7 +21,7 @@ import scala.annotation.tailrec * * @tparam Typeclass type constructor for the typeclass being derived * @tparam Type generic type of this parameter */ -trait Subtype[Typeclass[_], Type] { +trait Subtype[Typeclass[_], Type] extends Serializable { /** the type of subtype */ type SType <: Type @@ -47,7 +47,7 @@ trait Subtype[Typeclass[_], Type] { * * @tparam Typeclass type constructor for the typeclass being derived * @tparam Type generic type of this parameter */ -trait Param[Typeclass[_], Type] { +trait Param[Typeclass[_], Type] extends Serializable { /** the type of the parameter being represented * @@ -136,7 +136,7 @@ abstract class CaseClass[Typeclass[_], Type] private[magnolia] ( val isValueClass: Boolean, parametersArray: Array[Param[Typeclass, Type]], annotationsArray: Array[Any] -) { +) extends Serializable { override def toString: String = s"CaseClass(${typeName.full}, ${parameters.mkString(",")})" /** constructs a new instance of the case class type @@ -196,7 +196,7 @@ final class SealedTrait[Typeclass[_], Type]( val typeName: TypeName, subtypesArray: Array[Subtype[Typeclass, Type]], annotationsArray: Array[Any] -) { +) extends Serializable { override def toString: String = s"SealedTrait($typeName, Array[${subtypes.mkString(",")}])" -- cgit v1.2.3