Skip to content

Commit

Permalink
move one (compile) failing test to Scala 2
Browse files Browse the repository at this point in the history
  • Loading branch information
larsrh committed Oct 17, 2020
1 parent 8abdf3c commit 300a9cd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ addCommandAlias("validateKernelJS", "kernelLawsJS/test")
addCommandAlias("validateFreeJS", "freeJS/test")
addCommandAlias("validateAlleycatsJS", "alleycatsTestsJS/test")
addCommandAlias("validateAllJS", "all testsJS/test js/test kernelLawsJS/test freeJS/test alleycatsTestsJS/test")
addCommandAlias("validateDotty", ";++0.24.0!;alleycatsLawsJVM/compile")
addCommandAlias("validateDotty", ";++0.27.0-RC1!;alleycatsLawsJVM/compile")
addCommandAlias("validate", ";clean;validateJS;validateKernelJS;validateFreeJS;validateJVM;validateDotty")

addCommandAlias("prePR", "fmt")
Expand Down
13 changes: 13 additions & 0 deletions tests/src/test/scala-2.x/cats/tests/KleisliSuiteScala2.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package cats.tests

import cats._
import cats.data.Kleisli

// TODO should be fixed in Dotty 3.0.0-M1
// <https://github.com/lampepfl/dotty/issues/9793>
class KleisliSuiteScala2 extends CatsSuite {
test("Functor[Kleisli[F, Int, *]] is not ambiguous when an ApplicativeError and a FlatMap are in scope for F") {
def shouldCompile1[F[_], E](implicit F: ApplicativeError[F, E], FM: FlatMap[F]): Functor[Kleisli[F, Int, *]] =
Functor[Kleisli[F, Int, *]]
}
}
5 changes: 0 additions & 5 deletions tests/src/test/scala/cats/tests/KleisliSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,6 @@ class KleisliSuite extends CatsSuite {
SerializableTests.serializable(Contravariant[Kleisli[Option, *, Int]])
)

test("Functor[Kleisli[F, Int, *]] is not ambiguous when an ApplicativeError and a FlatMap are in scope for F") {
def shouldCompile1[F[_], E](implicit F: ApplicativeError[F, E], FM: FlatMap[F]): Functor[Kleisli[F, Int, *]] =
Functor[Kleisli[F, Int, *]]
}

test("local composes functions") {
forAll { (f: Int => Option[String], g: Int => Int, i: Int) =>
assert(f(g(i)) === (Kleisli.local[Option, String, Int](g)(Kleisli(f)).run(i)))
Expand Down

1 comment on commit 300a9cd

@smarter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

M1 should be out next week, the milestone date hasn't been updated.

Please sign in to comment.