Skip to content

Commit b901139

Browse files
committed
Oh scalafix where art thou
1 parent 7c1d946 commit b901139

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

compiler/src/dotty/tools/dotc/reporting/Diagnostic.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,8 @@ object Diagnostic:
7777
def enablingOption(using Context): Setting[Boolean] = ctx.settings.deprecation
7878
}
7979

80-
class ConfigurationWarning(
81-
msg: Message,
82-
pos: SourcePosition
83-
) extends ConditionalWarning(msg, pos) {
80+
class ConfigurationWarning(msg: Message, pos: SourcePosition) extends ConditionalWarning(msg, pos):
8481
def enablingOption(using Context): Setting[Boolean] = ctx.settings.configuration
85-
}
8682

8783
class MigrationWarning(
8884
msg: Message,

compiler/test/dotty/tools/dotc/SettingsTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class SettingsTests:
7878
val option = StringSetting("-option", "opt", "Some option", "zero")
7979

8080
val limit = 6000
81-
val args = List.tabulate(limit)(i => if (i % 2 == 0) "-option" else i.toString)
81+
val args = List.tabulate(limit)(i => if i % 2 == 0 then "-option" else i.toString)
8282
val summary = Settings.processArguments(args, processAll = true)
8383
assertTrue(summary.errors.isEmpty)
8484
assertEquals(limit/2 - 1, summary.warnings.size) // should warn on all but first

compiler/test/dotty/tools/utils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ object Useables:
4444

4545
// delete the result of createTempDirectory
4646
given Releasable[JPath] with
47-
override def release(released: JPath) = if (!Properties.isWin) remove(released)
47+
override def release(released: JPath) = if !Properties.isWin then remove(released)
4848
private def remove(path: JPath): Unit = if Files.isDirectory(path) then removeRecursively(path) else Files.delete(path)
4949
private def removeRecursively(path: JPath): Unit = Files.walkFileTree(path, ZappingFileVisitor())
5050
private class ZappingFileVisitor extends SimpleFileVisitor[JPath]:

0 commit comments

Comments
 (0)