diff options
author | Leandro Bolivar <leandrob131@gmail.com> | 2017-11-25 11:32:13 -0500 |
---|---|---|
committer | Leandro Bolivar <leandrob131@gmail.com> | 2017-11-25 11:32:13 -0500 |
commit | 3882602c0f233a6849c4ea5b179fe3c7ef7aadf4 (patch) | |
tree | 09e0ba58df878729604c474b5b62afde8ff9af9c | |
parent | 2de22e7d27025f839ef70916d3bfb99e69973521 (diff) | |
download | magnolia-3882602c0f233a6849c4ea5b179fe3c7ef7aadf4.tar.gz magnolia-3882602c0f233a6849c4ea5b179fe3c7ef7aadf4.tar.bz2 magnolia-3882602c0f233a6849c4ea5b179fe3c7ef7aadf4.zip |
Minor format fix
-rw-r--r-- | core/shared/src/main/scala/magnolia.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/shared/src/main/scala/magnolia.scala b/core/shared/src/main/scala/magnolia.scala index 337edc7..4f1c665 100644 --- a/core/shared/src/main/scala/magnolia.scala +++ b/core/shared/src/main/scala/magnolia.scala @@ -279,15 +279,16 @@ object Magnolia { val defaults = if (!isValueClass) { val caseClassCompanion = genericType.companion + // If a companion object is defined with alternative apply methods // it is needed get all the alternatives val constructorMethod = - caseClassCompanion.decl(TermName("apply")).alternatives.map(_.asMethod) + caseClassCompanion.decl(TermName("apply")).alternatives.map(_.asMethod) // The last apply method in the alternatives is the one that belongs // to the case class, not the user defined companion object val indexedConstructorParams = - constructorMethod.last.paramLists.head.map(_.asTerm).zipWithIndex + constructorMethod.last.paramLists.head.map(_.asTerm).zipWithIndex indexedConstructorParams.map { case (p, idx) => |