From 84cbb43bc3e4dc8399202763b371fda57ac3c072 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 6 Jan 2014 20:31:12 +0100 Subject: Remove debug output --- src/dotty/tools/dotc/typer/Applications.scala | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/dotty/tools/dotc/typer/Applications.scala') diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala index 485cba1f0..ec22fb029 100644 --- a/src/dotty/tools/dotc/typer/Applications.scala +++ b/src/dotty/tools/dotc/typer/Applications.scala @@ -788,12 +788,11 @@ trait Applications extends Compatibility { self: Typer => else /* 1/9 */ winsType1 || /* 2/27 */ !winsType2 }} - def narrowMostSpecific(alts: List[TermRef], onTarget: Boolean = false)(implicit ctx: Context): List[TermRef] = track("narrowMostSpecific") { + def narrowMostSpecific(alts: List[TermRef])(implicit ctx: Context): List[TermRef] = track("narrowMostSpecific") { (alts: @unchecked) match { case alt :: alts1 => def winner(bestSoFar: TermRef, alts: List[TermRef]): TermRef = alts match { case alt :: alts1 => - println(i"comparing ${alt.widen} ${bestSoFar.widen}") winner(if (isAsGood(alt, bestSoFar)) alt else bestSoFar, alts1) case nil => bestSoFar @@ -817,11 +816,6 @@ trait Applications extends Compatibility { self: Typer => */ def resolveOverloaded(alts: List[TermRef], pt: Type, targs: List[Type] = Nil)(implicit ctx: Context): List[TermRef] = track("resolveOverloaded") { - val onTarget = alts.head.name == "toLowerCase".toTermName - - if (onTarget) - println(i"resolveOverloaded $alts, pt = $pt") - def isDetermined(alts: List[TermRef]) = alts.isEmpty || alts.tail.isEmpty /** The shape of given tree as a type; cannot handle named arguments. */ @@ -880,14 +874,10 @@ trait Applications extends Compatibility { self: Typer => alts filter (isApplicable(_, targs, args, resultType)) val alts1 = narrowBySize(alts) - if (onTarget) println(i"narrow by size $alts") - if (isDetermined(alts1)) alts1 else { val alts2 = narrowByShapes(alts1) - if (onTarget) println(i"narrow by shapes $alts") - - if (isDetermined(alts2)) alts2 + if (isDetermined(alts2)) alts2 else narrowByTrees(alts2, pt.typedArgs, resultType) } @@ -901,9 +891,8 @@ trait Applications extends Compatibility { self: Typer => case pt => alts filter (normalizedCompatible(_, pt)) } - println(s"candidates = $alts") if (isDetermined(candidates)) candidates - else narrowMostSpecific(candidates, onTarget) + else narrowMostSpecific(candidates) } } -- cgit v1.2.3