Skip to content

Commit

Permalink
Clean up the PR
Browse files Browse the repository at this point in the history
  • Loading branch information
szymon-rd committed Mar 7, 2024
1 parent 9f469ed commit f5a6376
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/backend/jvm/BackendUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,4 @@ object BackendUtils {
"21" -> asm.Opcodes.V21,
"22" -> asm.Opcodes.V22,
)
}
}
1 change: 0 additions & 1 deletion compiler/src/dotty/tools/dotc/Driver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import dotty.tools.io.AbstractFile
import reporting.*
import core.Decorators.*
import config.Feature
import dotty.tools.dotc.config.ScalaSettings

import scala.util.control.NonFatal
import fromtasty.{TASTYCompiler, TastyFileUtil}
Expand Down
6 changes: 3 additions & 3 deletions compiler/src/dotty/tools/dotc/config/ScalaSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ private sealed trait WarningSettings:
val Wshadow: Setting[List[ChoiceWithHelp[String]]] = MultiChoiceHelpSetting(
WarningSetting,
name = "Wshadow",
helpArg = "advanced warning",
descr = "Enable or disable specific `lint` warnings",
helpArg = "warning",
descr = "Enable or disable specific `shadow` warnings",
choices = List(
ChoiceWithHelp("all", ""),
ChoiceWithHelp("private-shadow", "Warn if a private field or class parameter shadows a superclass field"),
Expand Down Expand Up @@ -358,7 +358,7 @@ private sealed trait XSettings:
val XmacroSettings: Setting[List[String]] = MultiStringSetting(AdvancedSetting, "Xmacro-settings", "setting1,setting2,..settingN", "List of settings which exposed to the macros")

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

end XSettings

Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/config/Settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ object Settings:


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

0 comments on commit f5a6376

Please sign in to comment.