Skip to content

Commit 4d613f4

Browse files
committed
Clean up the PR
1 parent 7994d02 commit 4d613f4

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

Diff for: compiler/src/dotty/tools/backend/jvm/BackendUtils.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,4 @@ object BackendUtils {
186186
"21" -> asm.Opcodes.V21,
187187
"22" -> asm.Opcodes.V22,
188188
)
189-
}
189+
}

Diff for: compiler/src/dotty/tools/dotc/Driver.scala

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import dotty.tools.io.AbstractFile
1010
import reporting.*
1111
import core.Decorators.*
1212
import config.Feature
13-
import dotty.tools.dotc.config.ScalaSettings
1413

1514
import scala.util.control.NonFatal
1615
import fromtasty.{TASTYCompiler, TastyFileUtil}

Diff for: compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ private sealed trait WarningSettings:
298298
val Wshadow: Setting[List[ChoiceWithHelp[String]]] = MultiChoiceHelpSetting(
299299
WarningSetting,
300300
name = "Wshadow",
301-
helpArg = "advanced warning",
302-
descr = "Enable or disable specific `lint` warnings",
301+
helpArg = "warning",
302+
descr = "Enable or disable specific `shadow` warnings",
303303
choices = List(
304304
ChoiceWithHelp("all", ""),
305305
ChoiceWithHelp("private-shadow", "Warn if a private field or class parameter shadows a superclass field"),
@@ -358,7 +358,7 @@ private sealed trait XSettings:
358358
val XmacroSettings: Setting[List[String]] = MultiStringSetting(AdvancedSetting, "Xmacro-settings", "setting1,setting2,..settingN", "List of settings which exposed to the macros")
359359

360360
// Deprecated
361-
val Xlint: Setting[_] = DeprecatedSetting(AdvancedSetting, "Xlint", "Enable or disable specific warnings", "Use -Wshadow to enable shadowing lints or -W:<opt> to enable specific sets of warnings.")
361+
val Xlint: Setting[_] = DeprecatedSetting(AdvancedSetting, "Xlint", "Enable or disable specific warnings", "Use -Wshadow to enable shadowing lints.")
362362

363363
end XSettings
364364

Diff for: compiler/src/dotty/tools/dotc/config/Settings.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ object Settings:
7777

7878

7979
assert(name.startsWith(s"-$category"), s"Setting $name does not start with category -$category")
80-
assert(!choices.contains(""), s"Empty string is not supported as a choice for setting $name")
80+
assert(legacyArgs || !choices.exists(_.contains("")), s"Empty string is not supported as a choice for setting $name")
8181
// Without the following assertion, it would be easy to mistakenly try to pass a file to a setting that ignores invalid args.
8282
// Example: -opt Main.scala would be interpreted as -opt:Main.scala, and the source file would be ignored.
8383
assert(!(summon[ClassTag[T]] == ListTag && ignoreInvalidArgs), s"Ignoring invalid args is not supported for multivalue settings: $name")

0 commit comments

Comments
 (0)