Skip to content

Commit

Permalink
Merge pull request #803 from fthomas/update/cats-core-2.2.0-RC3
Browse files Browse the repository at this point in the history
Update cats-core to 2.2.0-RC3
  • Loading branch information
fthomas authored Sep 1, 2020
2 parents 1682b6f + 73f3795 commit 81e0b52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ val gitDevUrl = s"[email protected]:$gitHubOwner/$projectName.git"
val Scala212 = "2.12.11"
val Scala213 = "2.13.3"

val catsVersion = "2.1.1"
val catsVersion = "2.2.0-RC3"
val jsonpathVersion = "2.4.0"
val macroParadiseVersion = "2.1.1"
val pureconfigVersion = "0.13.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package eu.timepit.refined.cats

import _root_.cats.Contravariant
import eu.timepit.refined.api.Refined
import eu.timepit.refined.numeric.Positive
import eu.timepit.refined.types.numeric.PosInt
import org.scalacheck.Prop._
import org.scalacheck.Properties
Expand Down Expand Up @@ -34,10 +36,9 @@ class RefTypeContravariantSpec extends Properties("Contravariant") {
}

property("derive Encoder[PosInt] via Contravariant[Encoder]") = secure {
// This import is needed because of https://github.com/scala/bug/issues/10753
import Encoder.encoderContravariant
import eu.timepit.refined.cats.derivation._

Encoder[PosInt].encode(PosInt.unsafeFrom(1)) ?= "1"
val encoder: Encoder[PosInt] = refTypeViaContravariant[Refined, Encoder, Int, Positive]
encoder.encode(PosInt.unsafeFrom(1)) ?= "1"
}
}

0 comments on commit 81e0b52

Please sign in to comment.