diff options
author | Paul Phillips <paulp@improving.org> | 2011-04-28 16:26:05 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-04-28 16:26:05 +0000 |
commit | c5d9b7e6a99f253d6da941610c58d9d9e1a02925 (patch) | |
tree | 461c02007998ff775201b6860843b555f4ae3bfc /src/partest | |
parent | 199ec3c10fe7d2b2029ea8ae6a19240b46181435 (diff) | |
download | scala-c5d9b7e6a99f253d6da941610c58d9d9e1a02925.tar.gz scala-c5d9b7e6a99f253d6da941610c58d9d9e1a02925.tar.bz2 scala-c5d9b7e6a99f253d6da941610c58d9d9e1a02925.zip |
I wrote a warning when nullary methods return U...
I wrote a warning when nullary methods return Unit. I wimped out of
including it in this patch because we had about 200 of them, and that's
what is fixed in this patch. I will add the warning to some kind of
"-Xlint" feature after 2.9.
This is motivated at least partly by the resolution of #4506, which
indicates the distinction between "def foo()" and "def foo" will
continue to jab its pointy stick into our eyes, so I believe we have a
minimal duty of at least following our own advice about what they mean
and not making a semirandom choice as to whether a method has parens or
not. Review by community.
Diffstat (limited to 'src/partest')
-rw-r--r-- | src/partest/scala/tools/partest/nest/ConsoleRunner.scala | 2 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/Worker.scala | 2 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/package.scala | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/partest/scala/tools/partest/nest/ConsoleRunner.scala b/src/partest/scala/tools/partest/nest/ConsoleRunner.scala index e2afc5644f..3957192f70 100644 --- a/src/partest/scala/tools/partest/nest/ConsoleRunner.scala +++ b/src/partest/scala/tools/partest/nest/ConsoleRunner.scala @@ -52,7 +52,7 @@ class ConsoleRunner extends DirectRunner { def denotesTestSet(arg: String) = testSetArgs contains arg - private def printVersion { NestUI outline (versionMsg + "\n") } + private def printVersion() { NestUI outline (versionMsg + "\n") } private val unaryArgs = List( "--pack", "--all", "--verbose", "--show-diff", "--show-log", diff --git a/src/partest/scala/tools/partest/nest/Worker.scala b/src/partest/scala/tools/partest/nest/Worker.scala index 301fe5e32b..bfa6427d21 100644 --- a/src/partest/scala/tools/partest/nest/Worker.scala +++ b/src/partest/scala/tools/partest/nest/Worker.scala @@ -57,7 +57,7 @@ class ScalaCheckFileManager(val origmanager: FileManager) extends FileManager { } object Output { - def init { + def init() { System.setOut(outRedirect) System.setErr(errRedirect) } diff --git a/src/partest/scala/tools/partest/package.scala b/src/partest/scala/tools/partest/package.scala index 5bcc66ddbd..fe33064f19 100644 --- a/src/partest/scala/tools/partest/package.scala +++ b/src/partest/scala/tools/partest/package.scala @@ -39,7 +39,7 @@ package object partest { System.getProperties.toList.sorted map { case (k, v) => "%s -> %s\n".format(k, v) } mkString } - def showAllJVMInfo { + def showAllJVMInfo() { NestUI.verbose(vmArgString) NestUI.verbose(allPropertiesString) } |