Skip to content

Commit 018dc17

Browse files
committed
Fix negative numeric args
1 parent 892e047 commit 018dc17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ object Settings:
187187
setBoolean(argRest, args)
188188
case (OptionTag, _) =>
189189
update(Some(propertyClass.get.getConstructor().newInstance()), args)
190-
case (_, args) =>
190+
case (ct, args) =>
191191
val argInArgRest = !argRest.isEmpty
192-
val argAfterParam = !argInArgRest && args.nonEmpty && !args.head.startsWith("-")
192+
val argAfterParam = !argInArgRest && args.nonEmpty && (ct == IntTag || !args.head.startsWith("-"))
193193
if argInArgRest then
194194
doSetArg(argRest, args)
195195
else if argAfterParam then

0 commit comments

Comments
 (0)