Skip to content

Commit 4c18b0f

Browse files
committed
Upgrade to 3.0.0-M2
1 parent b4cd6a4 commit 4c18b0f

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ Any version number that starts with `0.` is automatically recognized as Dotty by
4343
the `sbt-dotty` plugin, you don't need to set up anything:
4444

4545
```scala
46-
scalaVersion := "3.0.0-M1"
46+
scalaVersion := "3.0.0-M2"
4747
```
4848

4949
#### Nightly builds
5050
If the latest release of Dotty is missing a bugfix or feature you need, you may
5151
wish to use a nightly build. Look at the bottom of
52-
https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3.0.0-M1/ to find the version
52+
https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3.0.0-RC1/ to find the version
5353
number for the latest nightly build. Alternatively, you can set `scalaVersion :=
5454
dottyLatestNightlyBuild.get` to always use the latest nightly build of dotty.
5555

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ lazy val root = project
55
description := "Example sbt project that compiles using Dotty",
66
version := "0.1.0",
77

8-
scalaVersion := "3.0.0-M1",
8+
scalaVersion := "3.0.0-M2",
99

1010
useScala3doc := true,
1111
)

src/main/scala/MultiversalEquality.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ import scala.language.strictEquality
22

33
/**
44
* Multiversal Equality: https://dotty.epfl.ch/docs/reference/contextual/multiversal-equality.html
5-
* scala.Eq definition: https://github.com/lampepfl/dotty/blob/master/library/src/scala/Eql.scala
5+
* scala.Eq definition: https://github.com/lampepfl/dotty/blob/master/library/src/scala/CanEqual.scala
66
*/
77
object MultiversalEquality {
88

99
def test: Unit = {
1010

1111
// Values of types Int and String cannot be compared with == or !=,
1212
// unless we add the derived delegate instance like:
13-
given Eql[Int, String] = Eql.derived
13+
given CanEqual[Int, String] = CanEqual.derived
1414
println(3 == "3")
1515

1616
// By default, all numbers are comparable, because of;
17-
// implicit def eqlNumber: Eql[Number, Number] = derived
17+
// given canEqualNumber as CanEqual[Number, Number] = derived
1818
println(3 == 5.1)
1919

2020
// By default, all Sequences are comparable, because of;
21-
// implicit def eqlSeq[T, U](implicit eq: Eql[T, U]): Eql[GenSeq[T], GenSeq[U]] = derived
21+
// given canEqualSeq[T, U](using eq: CanEqual[T, U]) as CanEqual[Seq[T], Seq[U]] = derived
2222
println(List(1, 2) == Vector(1, 2))
2323

2424
class A(a: Int)
@@ -29,8 +29,8 @@ object MultiversalEquality {
2929

3030
// scala.language.strictEquality is enabled, therefore we need some extra delegate instances
3131
// to compare instances of A and B.
32-
given Eql[A, B] = Eql.derived
33-
given Eql[B, A] = Eql.derived
32+
given CanEqual[A, B] = CanEqual.derived
33+
given CanEqual[B, A] = CanEqual.derived
3434

3535
println(a != b)
3636
println(b == a)

0 commit comments

Comments
 (0)