Skip to content

Commit

Permalink
Tweak specialization code
Browse files Browse the repository at this point in the history
Extract specialization types into their own object.

Disable coverage for specialization types.
  • Loading branch information
NthPortal committed Sep 3, 2017
1 parent d02b716 commit 437547d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/scala/com/nthportal/convert/Convert.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.nthportal.convert

import com.nthportal.convert.SpecializationTypes.specTypes

import scala.language.higherKinds
import scala.reflect.ClassTag
import scala.util.control.ControlThrowable
Expand Down Expand Up @@ -34,9 +36,6 @@ import scala.util.control.ControlThrowable
* block from this Convert instance.
*/
sealed trait Convert {

import Convert.specTypes

/** A function which takes the result type of a conversion as input,
* and yields the return type of the conversion block.
*
Expand Down Expand Up @@ -147,8 +146,6 @@ sealed trait Convert {
}

object Convert {
private val specTypes = new Specializable.Group((Byte, Short, Int, Long, Float, Double, Boolean))

/**
* A [[Convert]] which returns the result of a conversion as is,
* and throws an exception if the conversion fails.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.nthportal.convert

// $COVERAGE-OFF$
private[convert] object SpecializationTypes {
val specTypes = new Specializable.Group((Byte, Short, Int, Long, Float, Double, Boolean))
}
// $COVERAGE-ON$

0 comments on commit 437547d

Please sign in to comment.