aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-06-29 19:57:02 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-11 13:35:02 +0200
commite749d832e9adebc502c961d743b3b29072f8116a (patch)
tree4c9bdc83925a118ce4cfe37f9d2deea2c6ee7613 /src/dotty/tools/dotc/typer
parent6414f3bccf5319d273e8f5eb5461b111e9270b34 (diff)
downloaddotty-e749d832e9adebc502c961d743b3b29072f8116a.tar.gz
dotty-e749d832e9adebc502c961d743b3b29072f8116a.tar.bz2
dotty-e749d832e9adebc502c961d743b3b29072f8116a.zip
Various tweaks
- Swap order of subtype tests The theory is that if two refined types have the same refined name, then they are likely to be of related classes. So it seems more fruitful to check the argument before the typeconstructor because that way we test the part that's more likely to fail first. Rough observations seem to indicate a 3% improvement in the junit test time. - Cleanups Drop some unnecessary cases; improve comments. - Smarter handling of LazyRefs in betaReduce Try to combine type constructor and arguments under a common LazyRef. - Optimize RecType/RecType comparisons - Fix compareHkLambda, make it check variances.
Diffstat (limited to 'src/dotty/tools/dotc/typer')
-rw-r--r--src/dotty/tools/dotc/typer/Inferencing.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Inferencing.scala b/src/dotty/tools/dotc/typer/Inferencing.scala
index 3b79d7c4c..2b37fa36c 100644
--- a/src/dotty/tools/dotc/typer/Inferencing.scala
+++ b/src/dotty/tools/dotc/typer/Inferencing.scala
@@ -218,7 +218,7 @@ object Inferencing {
val qualifies = (tvar: TypeVar) =>
(tree contains tvar.owningTree) || ownedBy.exists && tvar.owner == ownedBy
def interpolate() = Stats.track("interpolateUndetVars") {
- val tp = tree.tpe.widen // TODO add `.BetaReduce` ?
+ val tp = tree.tpe.widen
constr.println(s"interpolate undet vars in ${tp.show}, pos = ${tree.pos}, mode = ${ctx.mode}, undets = ${constraint.uninstVars map (tvar => s"${tvar.show}@${tvar.owningTree.pos}")}")
constr.println(s"qualifying undet vars: ${constraint.uninstVars filter qualifies map (tvar => s"$tvar / ${tvar.show}")}, constraint: ${constraint.show}")