diff --git a/.gitignore b/.gitignore index 81dac8842..d8f5e80d8 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,6 @@ target /examples/simple-sbt/project/ /examples/simple-sbt/target/ + +# Intellij +.idea diff --git a/src/main/scala/org/scalacheck/Cogen.scala b/src/main/scala/org/scalacheck/Cogen.scala index cf4b6ccb3..a1285bed6 100644 --- a/src/main/scala/org/scalacheck/Cogen.scala +++ b/src/main/scala/org/scalacheck/Cogen.scala @@ -126,8 +126,8 @@ object Cogen extends CogenArities with CogenLowPriority { implicit def cogenSet[A: Cogen: Ordering]: Cogen[Set[A]] = Cogen.it(_.toVector.sorted.iterator) - implicit def cogenMap[K: Cogen: Ordering, V: Cogen: Ordering]: Cogen[Map[K, V]] = - Cogen.it(_.toVector.sorted.iterator) + implicit def cogenMap[K: Cogen: Ordering, V: Cogen]: Cogen[Map[K, V]] = + Cogen.it(_.toVector.sortBy(_._1).iterator) implicit def cogenFunction0[Z: Cogen]: Cogen[() => Z] = Cogen[Z].contramap(f => f())