We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 552a56a + 5ff8649 commit 3e43c7fCopy full SHA for 3e43c7f
src/dotty/tools/dotc/config/Settings.scala
@@ -119,11 +119,13 @@ object Settings {
119
case (ListTag, _) =>
120
if (argRest.isEmpty) missingArg
121
else update((argRest split ",").toList, args)
122
+ case (StringTag, _) if choices.nonEmpty =>
123
+ if (argRest.isEmpty) missingArg
124
+ else if (!choices.contains(argRest))
125
+ fail(s"$arg is not a valid choice for $name", args)
126
+ else update(argRest, args)
127
case (StringTag, arg2 :: args2) =>
- if (choices.nonEmpty && !(choices contains arg2))
- fail(s"$arg2 is not a valid choice for $name", args2)
- else
- update(arg2, args2)
128
+ update(arg2, args2)
129
case (IntTag, arg2 :: args2) =>
130
try {
131
val x = arg2.toInt
0 commit comments