Skip to content

Commit 8dec194

Browse files
Upgrade Dotty to 0.16.0-RC3
1 parent 55ba439 commit 8dec194

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

build.sbt

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

8-
scalaVersion := "0.16.0-RC2"
8+
scalaVersion := "0.16.0-RC3"
99
)

src/main/scala/Conversion.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ object Conversion {
1010

1111
def convert[T, U](x: T) given (converter: Conversion[T, U]): U = converter(x)
1212

13-
implied IntWrapperToDoubleWrapper for Conversion[IntWrapper, DoubleWrapper] = new Conversion[IntWrapper, DoubleWrapper] {
13+
delegate IntWrapperToDoubleWrapper for Conversion[IntWrapper, DoubleWrapper] = new Conversion[IntWrapper, DoubleWrapper] {
1414
override def apply(i: IntWrapper): DoubleWrapper = new DoubleWrapper(i.a.toDouble)
1515
}
1616

src/main/scala/ImpliedInstances.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ object ImpliedInstances {
1818
override def parse(s: String): Try[A] = f(s)
1919
}
2020

21-
implied stringParser for StringParser[String] = baseParser(Success(_))
22-
implied intParser for StringParser[Int] = baseParser(s Try(s.toInt))
21+
delegate stringParser for StringParser[String] = baseParser(Success(_))
22+
delegate intParser for StringParser[Int] = baseParser(s Try(s.toInt))
2323

24-
implied optionParser[A] for StringParser[Option[A]] given (parser: => StringParser[A]) = new StringParser[Option[A]] {
24+
delegate optionParser[A] for StringParser[Option[A]] given (parser: => StringParser[A]) = new StringParser[Option[A]] {
2525
override def parse(s: String): Try[Option[A]] = s match {
2626
case "" Success(None) // implicit parser not used.
2727
case str parser.parse(str).map(x Some(x)) // implicit parser is evaluated at here

src/main/scala/MultiversalEquality.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ object MultiversalEquality {
99
def test: Unit = {
1010

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

1616
// By default, all numbers are comparable, because of;
@@ -27,10 +27,10 @@ object MultiversalEquality {
2727
val a = new A(4)
2828
val b = new B(4)
2929

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

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

0 commit comments

Comments
 (0)