aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Pretty <jon.pretty@propensive.com>2018-06-05 16:13:51 +0200
committerGitHub <noreply@github.com>2018-06-05 16:13:51 +0200
commit43769758778786b48f4b48cda7fe8d7f46960eb4 (patch)
tree8cc9174eee0ba9c30d681c7ed9af1ff1a13db263
parent4e16f85e92104720baedad50bd0ae4b4322194bf (diff)
parent42d05080f2b6a8034ec92da5119d0b82a7cc0503 (diff)
downloadmagnolia-43769758778786b48f4b48cda7fe8d7f46960eb4.tar.gz
magnolia-43769758778786b48f4b48cda7fe8d7f46960eb4.tar.bz2
magnolia-43769758778786b48f4b48cda7fe8d7f46960eb4.zip
Merge pull request #97 from jto/julient/serializable
Make instances Serializable
-rw-r--r--core/shared/src/main/scala/interface.scala8
1 files 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(",")}])"