Skip to content

Commit 84863d5

Browse files
committed
Clean up the PR
1 parent 2c59972 commit 84863d5

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

compiler/src/dotty/tools/backend/jvm/BackendUtils.scala

Lines changed: 1 addition & 1 deletion
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+
}

compiler/src/dotty/tools/dotc/Driver.scala

Lines changed: 0 additions & 1 deletion
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}

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

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

361361
// Deprecated
362-
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.")
362+
val Xlint: Setting[_] = DeprecatedSetting(AdvancedSetting, "Xlint", "Enable or disable specific warnings", "Use -Wshadow to enable shadowing lints.")
363363

364364
end XSettings
365365

compiler/src/dotty/tools/dotc/config/Settings.scala

Lines changed: 1 addition & 1 deletion
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)