Skip to content

Commit cc2aa77

Browse files
Merge pull request #48 from dotty-staging/update/3.0.0-M3
Update to 3.0.0-M3
2 parents d3a0e15 + 38520e5 commit cc2aa77

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ project/boot/
1212
project/plugins/project/
1313
project/local-plugins.sbt
1414
.history
15+
.bsp
1516

1617
# Scala-IDE specific
1718
.scala_dependencies

build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
lazy val root = project
22
.in(file("."))
33
.settings(
4-
name := "dotty-example-project",
5-
description := "Example sbt project that compiles using Dotty",
4+
name := "scala3-example-project",
5+
description := "Example sbt project that compiles using Scala 3",
66
version := "0.1.0",
77

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

1010
useScala3doc := true,
1111
)

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.6")
1+
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.0")

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)(using converter: Conversion[T, U]): U = converter(x)
1212

13-
given IntWrapperToDoubleWrapper as Conversion[IntWrapper, DoubleWrapper] = new Conversion[IntWrapper, DoubleWrapper] {
13+
given IntWrapperToDoubleWrapper: 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-
given stringParser as StringParser[String] = baseParser(Success(_))
22-
given intParser as StringParser[Int] = baseParser(s Try(s.toInt))
21+
given stringParser: StringParser[String] = baseParser(Success(_))
22+
given intParser: StringParser[Int] = baseParser(s Try(s.toInt))
2323

24-
given optionParser[A](using parser: => StringParser[A]) as StringParser[Option[A]] = new StringParser[Option[A]] {
24+
given optionParser[A](using parser: => StringParser[A]): StringParser[Option[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

0 commit comments

Comments
 (0)