Skip to content

Commit af06082

Browse files
committed
bugfix: CheckUnused checks span.exists before testing its parts
1 parent 2395411 commit af06082

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,10 @@ private sealed trait WarningSettings:
192192
ChoiceWithHelp("linted", "Enable -Wunused:imports,privates,locals,implicits"),
193193
ChoiceWithHelp(
194194
name = "strict-no-implicit-warn",
195-
description = "Same as -Wunused:import, only for imports of explicit named members.\n" +
196-
"NOTE : This overrides -Wunused:imports and NOT set by -Wunused:all"
195+
description = """Same as -Wunused:imports, only for imports of explicit named members.
196+
|NOTE : This overrides -Wunused:imports and NOT set by -Wunused:all""".stripMargin
197197
),
198+
ChoiceWithHelp("unsafe-warn-patvars", "Deprecated alias for `patvars`"),
198199
),
199200
default = Nil
200201
)
@@ -219,7 +220,7 @@ private sealed trait WarningSettings:
219220
def params(using Context) = allOr("params")
220221
def privates(using Context) =
221222
allOr("privates") || allOr("linted")
222-
def patvars(using Context) = allOr("patvars")
223+
def patvars(using Context) = allOr("patvars") || isChoiceSet("unsafe-warn-patvars")
223224
def inlined(using Context) = isChoiceSet("inlined")
224225
def linted(using Context) =
225226
allOr("linted")

0 commit comments

Comments
 (0)