aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotty/tools/dotc/typer/Applications.scala17
-rw-r--r--test/dotc/tests.scala8
2 files changed, 6 insertions, 19 deletions
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)
}
}
diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala
index e612e269d..84765d02b 100644
--- a/test/dotc/tests.scala
+++ b/test/dotc/tests.scala
@@ -45,9 +45,7 @@ class tests extends CompilerTest {
@Test def dotc = compileDir(dotcDir + "tools/dotc")
@Test def dotc_ast = compileDir(dotcDir + "tools/dotc/ast")
- @Test def dotc_settings = compileFile(dotcDir + "tools/dotc/config/", "Settings")
- @Test def dotc_compilercommand = compileFile(dotcDir + "tools/dotc/config/", "CompilerCommand")
- @Test def dotc_javaplatform = compileFile(dotcDir + "tools/dotc/config/", "JavaPlatform")
- @Test def dotc_outputdirs = compileFile(dotcDir + "tools/dotc/config/", "OutputDirs")
- @Test def dotc_pathresolver = compileFile(dotcDir + "tools/dotc/config/", "PathResolver")
+ @Test def dotc_config = compileDir(dotcDir + "tools/dotc/config")
+// @Test def dotc_compilercommand = compileFile(dotcDir + "tools/dotc/config/", "CompilerCommand")
+
} \ No newline at end of file