summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/CompileServer.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-01-02 06:41:31 -0800
committerPaul Phillips <paulp@improving.org>2012-01-02 14:37:36 -0800
commit451e1dc2da16c1bb5a7a59488865df9294eeaf3e (patch)
treedcbae11619389a16115d005ab2fc9bfdf5c4ba8d /src/compiler/scala/tools/nsc/CompileServer.scala
parentbeb875187914b12b1b9dbb5621447067e2926c7c (diff)
downloadscala-451e1dc2da16c1bb5a7a59488865df9294eeaf3e.tar.gz
scala-451e1dc2da16c1bb5a7a59488865df9294eeaf3e.tar.bz2
scala-451e1dc2da16c1bb5a7a59488865df9294eeaf3e.zip
Added -Xlog-implicit-conversions.
New command line option prints a message whenever the compiler inserts an implicit conversion. Implicit parameters are not under consideration here, since the primary motivation is to make it easy to inspect your code for unintentional conversions, since they can have dramatic performance implications. class A { def f(xs: Array[Byte]) = xs.size def g(xs: Array[Byte]) = xs.length } % scalac -Xlog-implicit-conversions logImplicits.scala logImplicits.scala:2: applied implicit conversion from xs.type to ?{val size: ?} = implicit def byteArrayOps(xs: Array[Byte]): scala.collection.mutable.ArrayOps[Byte] def f(xs: Array[Byte]) = xs.size ^
Diffstat (limited to 'src/compiler/scala/tools/nsc/CompileServer.scala')
-rw-r--r--src/compiler/scala/tools/nsc/CompileServer.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/CompileServer.scala b/src/compiler/scala/tools/nsc/CompileServer.scala
index b10ac78ac7..6393ade146 100644
--- a/src/compiler/scala/tools/nsc/CompileServer.scala
+++ b/src/compiler/scala/tools/nsc/CompileServer.scala
@@ -136,9 +136,9 @@ class StandardCompileServer extends SocketServer {
}
if (command.shouldStopWithInfo)
- reporter.info(null, command.getInfoMessage(newGlobal(newSettings, reporter)), true)
+ reporter.echo(command.getInfoMessage(newGlobal(newSettings, reporter)))
else if (command.files.isEmpty)
- reporter.info(null, command.usageMsg, true)
+ reporter.echo(command.usageMsg)
else {
if (isCompilerReusable) {
info("[Reusing existing Global instance.]")