Skip to content

Commit ef1ff9d

Browse files
committed
Drop old syntax in more files
1 parent 595db8d commit ef1ff9d

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def exec(projectDir: Path, binary: String, arguments: String*): Int =
3131
exitCode
3232

3333

34-
sealed trait CommunityProject
34+
sealed trait CommunityProject:
3535
private var published = false
3636

3737
val project: String
@@ -77,17 +77,23 @@ sealed trait CommunityProject
7777
published = true
7878
end CommunityProject
7979

80-
final case class MillCommunityProject(project: String, baseCommand: String,
81-
dependencies: List[CommunityProject] = Nil) extends CommunityProject
80+
final case class MillCommunityProject(
81+
project: String,
82+
baseCommand: String,
83+
dependencies: List[CommunityProject] = Nil) extends CommunityProject:
8284
override val binaryName: String = "./mill"
8385
override val updateCommand = s"$baseCommand.compileClasspath"
8486
override val testCommand = s"$baseCommand.test"
8587
override val publishCommand = s"$baseCommand.publishLocal"
8688
override val runCommandsArgs = List("-i", "-D", s"dottyVersion=$compilerVersion")
8789

88-
final case class SbtCommunityProject(project: String, sbtTestCommand: String,
89-
sbtUpdateCommand: String, extraSbtArgs: List[String] = Nil,
90-
dependencies: List[CommunityProject] = Nil, sbtPublishCommand: String = null) extends CommunityProject
90+
final case class SbtCommunityProject(
91+
project: String,
92+
sbtTestCommand: String,
93+
sbtUpdateCommand: String,
94+
extraSbtArgs: List[String] = Nil,
95+
dependencies: List[CommunityProject] = Nil,
96+
sbtPublishCommand: String = null) extends CommunityProject:
9197
override val binaryName: String = "sbt"
9298
private val baseCommand = s";clean ;set updateOptions in Global ~= (_.withLatestSnapshots(false)) ;++$compilerVersion! "
9399
override val testCommand = s"$baseCommand$sbtTestCommand"
@@ -103,7 +109,7 @@ final case class SbtCommunityProject(project: String, sbtTestCommand: String,
103109
"-sbt-version", "1.3.6",
104110
s"--addPluginSbtFile=$sbtPluginFilePath")
105111

106-
object projects
112+
object projects:
107113
lazy val utest = MillCommunityProject(
108114
project = "utest",
109115
baseCommand = s"utest.jvm[$compilerVersion]",
@@ -265,7 +271,7 @@ object projects
265271
end projects
266272

267273
@Category(Array(classOf[TestCategory]))
268-
class CommunityBuildTest {
274+
class CommunityBuildTest:
269275
given CommunityBuildTest = this
270276

271277
/** Build the given project with the published local compiler and sbt plugin.
@@ -335,7 +341,7 @@ class CommunityBuildTest {
335341
@Test def xmlInterpolator = projects.xmlInterpolator.run()
336342
@Test def effpi = projects.effpi.run()
337343
@Test def sconfig = projects.sconfig.run()
338-
}
344+
end CommunityBuildTest
339345

340346
class TestCategory
341347
class UpdateCategory

library/src/scala/compiletime/testing/ErrorKind.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ package scala.compiletime.testing
22

33
/** An error can be either a parse-time or a typecheck-time */
44
sealed trait ErrorKind // TODO make this enum, so far not doable because ScalaJS compilation fails on it
5-
object ErrorKind
5+
object ErrorKind:
66
case object Parser extends ErrorKind
77
case object Typer extends ErrorKind

0 commit comments

Comments
 (0)