summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 4f006fe9a9..3b826ae2e5 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -1058,11 +1058,9 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
inferView(tree, tree.tpe, pt) match {
case EmptyTree => // didn't find a view -- fall through
case coercion =>
- if (settings.debug || settings.logImplicitConv) {
- val msg = s"inferred view from ${tree.tpe} to $pt via $coercion: ${coercion.tpe}"
- debuglog(msg)
- if (settings.logImplicitConv) context.echo(tree.pos, msg)
- }
+ def msg = s"inferred view from ${tree.tpe} to $pt via $coercion: ${coercion.tpe}"
+ if (settings.logImplicitConv) context.echo(tree.pos, msg)
+ else debuglog(msg)
val silentContext = context.makeImplicit(context.ambiguousErrors)
val res = newTyper(silentContext).typed(