diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-09-09 13:57:39 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-09-09 13:57:39 +0200 |
commit | 0d7fd0828b7ab47a5eca011177aa468a30b6085f (patch) | |
tree | 5d4bd6f173a5cbb453b3023d0af30d0e5e903286 | |
parent | f342445f68654c1606871b5d7372621558731f65 (diff) | |
download | scala-0d7fd0828b7ab47a5eca011177aa468a30b6085f.tar.gz scala-0d7fd0828b7ab47a5eca011177aa468a30b6085f.tar.bz2 scala-0d7fd0828b7ab47a5eca011177aa468a30b6085f.zip |
Avoid needless Type stringification when logging is disabled.
Since 4d6be05c28, we've been a tad wasteful in implicit searches.
This adds a by-name parameter to the local logging method to
avoid that.
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Implicits.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala index 3a6b25f1cd..fbe8cd77fb 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala @@ -316,7 +316,7 @@ trait Implicits { */ class ImplicitSearch(tree: Tree, pt: Type, isView: Boolean, context0: Context, pos0: Position = NoPosition) extends Typer(context0) with ImplicitsContextErrors { val searchId = implicitSearchId() - private def typingLog(what: String, msg: String) = + private def typingLog(what: String, msg: => String) = typingStack.printTyping(tree, f"[search #$searchId] $what $msg") import infer._ |