From 0d7fd0828b7ab47a5eca011177aa468a30b6085f Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Mon, 9 Sep 2013 13:57:39 +0200 Subject: 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. --- src/compiler/scala/tools/nsc/typechecker/Implicits.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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._ -- cgit v1.2.3