Skip to content

Commit f8f940f

Browse files
committed
Make this repo work with scala/scala3#3421
Replace the use of ambiguous implicits by the `scala.implicits.Not` class introduced in the PR.
1 parent f3b9384 commit f8f940f

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

build.sbt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ lazy val core = crossProject
157157
"org.typelevel" %%% "cats-core" % CatsVersion,
158158
"org.typelevel" %%% "cats-free" % CatsVersion,
159159
"org.scalaz" %%% "scalaz-core" % ScalazVersion,
160+
"ch.epfl.lamp" %% "dotty-library" % "0.5.0-bin-SNAPSHOT-nonbootstrapped",
160161

161162
"com.chuusai" %%% "shapeless" % "2.3.2",
162163

@@ -169,6 +170,10 @@ lazy val coreJS = core.js
169170

170171
lazy val dottyThing = project
171172
.dependsOn(coreJVM)
173+
.settings(
174+
projectDependencies ~= (_.map(_.withDottyCompat())),
175+
scalaVersion := "0.5.0-bin-SNAPSHOT"
176+
)
172177

173178
enablePlugins(GitVersioning)
174179

core/src/main/scala/shims/util/nsub.scala renamed to core/src/main/scala/shims/util/package.scala

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17-
package shims.util
17+
package shims
1818

19-
import scala.annotation.implicitNotFound
20-
21-
@implicitNotFound("unable to prove that $A is NOT a subtype of $B (likely because it actually is)")
22-
sealed trait </<[A, B]
23-
24-
private[util] trait NSubLowPriorityImplicits {
25-
implicit def universal[A, B]: A </< B = null
26-
}
27-
28-
object </< extends NSubLowPriorityImplicits {
29-
implicit def lie1[A, B](implicit ev: A <:< B): A </< B = null
30-
implicit def lie2[A, B](implicit ev: A <:< B): A </< B = null
19+
package object util {
20+
type </<[A, B] = scala.implicits.Not[A <:< B]
3121
}

project/plugins.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
2424
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "0.5.0")
2525

2626
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.14")
27+
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.1.6")

0 commit comments

Comments
 (0)