Skip to content

Commit 09e8bfd

Browse files
committed
Update to dotty-0.16.0-RC3, remove workaround for a fixed bug: scala/scala3#6385
1 parent 4c4f427 commit 09e8bfd

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ cd no-more-orphans
1111
sbt test
1212
```
1313

14-
Tested on Scala 2.12.8, 2.13.0-M5, 2.11.8 and [dotty-0.14.0-RC1](https://github.com/7mind/no-more-orphans/tree/dotty)
14+
Tested on Scala 2.12.8, 2.13.0-M5, 2.11.8 and [dotty-0.16.0-RC3](https://github.com/7mind/no-more-orphans/tree/dotty)
1515

16-
Note that dotty version requires a slightly different, but compatible, encoding (`<:<` evidence at the end) due to pending bugs in dotty:
16+
Dotty treats intersection types differently, so one of the problems with Scala 2 encoding is manifest for ALL implicits, not just optional:
1717

18-
- https://github.com/lampepfl/dotty/issues/6385
1918
- https://github.com/lampepfl/dotty/issues/6384

build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name := "no-more-orphans-test"
22

33
version := "0.1"
44

5-
val dottyVersion = "0.14.0-RC1"
6-
scalaVersion := dottyVersion
5+
val dottyVersion = "0.16.0-RC3"
76

7+
scalaVersion in Global := dottyVersion
88
crossScalaVersions in Global := Seq("2.11.12", "2.12.8", "2.13.0-M5", dottyVersion)
99

1010
val cats_effect = "org.typelevel" %% "cats-effect" % "1.2.0"
1111
val scalaz_core = "org.scalaz" %% "scalaz-core" % "7.2.27"
12-
val scalatest = "org.scalatest" %% "scalatest" % "3.1.0-SNAP8"
12+
val scalatest = "org.scalatest" %% "scalatest" % "3.0.8"
1313

1414
scalacOptions in Global ++= Seq("-Xlog-implicits", "-language:higherKinds")
1515

mylib/src/main/scala/mylib/MyBox.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ object MyBox extends LowPriorityMyBox {
2323

2424
trait LowPriorityMyBox {
2525

26-
implicit def optionalCatsSemigroupalSemigroupKInvariantForMyBox[F[_[_]]: CatsSemigroupalSemigroupKInvariant, G](implicit ev: F[MyBox] <:< G): G = {
26+
implicit def optionalCatsSemigroupalSemigroupKInvariantForMyBox[F[_[_]]: CatsSemigroupalSemigroupKInvariant, G]: F[MyBox] = {
2727
new ImpllSemigroupalSemigroupKInvariant[MyBox] {
2828
def combineK[A](x: MyBox[A], y: MyBox[A]): MyBox[A] = y
2929
def product[A, B](fa: MyBox[A], fb: MyBox[B]): MyBox[(A, B)] = MyBox((fa.get, fb.get))
3030
def imap[A, B](fa: MyBox[A])(f: A => B)(g: B => A): MyBox[B] = MyBox(f(fa.get))
31-
}.asInstanceOf[G]
31+
}.asInstanceOf[F[MyBox]]
3232
}
3333

3434

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version = 1.2.8
1+
sbt.version = 1.3.0-RC2

0 commit comments

Comments
 (0)