diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/GenericRunnerCommand.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/Settings.scala | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/GenericRunnerCommand.scala b/src/compiler/scala/tools/nsc/GenericRunnerCommand.scala index 26742f5a88..3c08c603af 100644 --- a/src/compiler/scala/tools/nsc/GenericRunnerCommand.scala +++ b/src/compiler/scala/tools/nsc/GenericRunnerCommand.scala @@ -33,7 +33,7 @@ class GenericRunnerCommand(allargs: List[String], error: String => Unit) { if (args eq args0) args = setting.tryToSet(args) if (args eq args0) { - error("unknown option: '" + args.head + "'") + error("bad option: '" + args.head + "'") ok = false } } diff --git a/src/compiler/scala/tools/nsc/Settings.scala b/src/compiler/scala/tools/nsc/Settings.scala index 87d0defa00..79b6a6c140 100644 --- a/src/compiler/scala/tools/nsc/Settings.scala +++ b/src/compiler/scala/tools/nsc/Settings.scala @@ -206,7 +206,7 @@ class Settings(error: String => Unit) { /** If first arg defines this setting, consume it as well as all following * args needed to define the setting. If this can be done without * error, set value field and return suffix of args else - * issue error message and return empty. + * issue error message and return the arguments unchanged. * If first arg does not define this setting return args unchanged. */ def tryToSet(args: List[String]): List[String] @@ -267,7 +267,7 @@ class Settings(error: String => Unit) { case n :: rest if (name == n || abbreviation == n) => if (rest.isEmpty) { error("missing argument") - List() + args } else { value = rest.head rest.tail @@ -374,7 +374,7 @@ class Settings(error: String => Unit) { val phase = n.substring(name.length() + 1) if (phase == "") { error("missing phase") - List() + args } else { value = value ::: List(phase) rest |