diff options
author | Paul Phillips <paulp@improving.org> | 2010-08-03 18:01:34 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-08-03 18:01:34 +0000 |
commit | a14012bd560fac14f6dccf53ae55a3680300db97 (patch) | |
tree | e70f4c88eee36c7982f48f78dc2fe2b9a3526d1e | |
parent | 3d6fe98b652a591c7c865a71a62ef1d8e3365b58 (diff) | |
download | scala-a14012bd560fac14f6dccf53ae55a3680300db97.tar.gz scala-a14012bd560fac14f6dccf53ae55a3680300db97.tar.bz2 scala-a14012bd560fac14f6dccf53ae55a3680300db97.zip |
Parse ordering issue prevented passing properti...
Parse ordering issue prevented passing properties containing a :. There
is a test case included, but note that partest passes it with or without
the patch: see ticket #3712. Closes #3495, no review.
-rw-r--r-- | src/compiler/scala/tools/nsc/settings/MutableSettings.scala | 4 | ||||
-rw-r--r-- | test/files/pos/bug3495.flags | 1 | ||||
-rw-r--r-- | test/files/pos/bug3495.scala | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/settings/MutableSettings.scala b/src/compiler/scala/tools/nsc/settings/MutableSettings.scala index e8443d11c1..1e0e00e01d 100644 --- a/src/compiler/scala/tools/nsc/settings/MutableSettings.scala +++ b/src/compiler/scala/tools/nsc/settings/MutableSettings.scala @@ -143,11 +143,11 @@ class MutableSettings(val errorFn: String => Unit) extends AbsSettings with Scal // // Internally we use Option[List[String]] to discover error, // but the outside expects our arguments back unchanged on failure - if (arg contains ":") parseColonArg(arg) match { + if (isPropertyArg(arg)) parsePropertyArg(arg) match { case Some(_) => rest case None => args } - else if (isPropertyArg(arg)) parsePropertyArg(arg) match { + else if (arg contains ":") parseColonArg(arg) match { case Some(_) => rest case None => args } diff --git a/test/files/pos/bug3495.flags b/test/files/pos/bug3495.flags new file mode 100644 index 0000000000..08de722af0 --- /dev/null +++ b/test/files/pos/bug3495.flags @@ -0,0 +1 @@ +-Dsoot.class.path=bin:. diff --git a/test/files/pos/bug3495.scala b/test/files/pos/bug3495.scala new file mode 100644 index 0000000000..8d5dff4302 --- /dev/null +++ b/test/files/pos/bug3495.scala @@ -0,0 +1,2 @@ +class Foo { } + |