summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2010-01-06 16:46:48 +0000
committerMartin Odersky <odersky@gmail.com>2010-01-06 16:46:48 +0000
commit64b0678d3344380666d62c855cab2dad8a6ef08b (patch)
tree119bb1a3c7eb333f17442fcfc8ecd897e8665c83 /src/compiler/scala/tools/nsc/typechecker/Implicits.scala
parente97ae22dd714d372e77608b01d980e66d5dbe081 (diff)
downloadscala-64b0678d3344380666d62c855cab2dad8a6ef08b.tar.gz
scala-64b0678d3344380666d62c855cab2dad8a6ef08b.tar.bz2
scala-64b0678d3344380666d62c855cab2dad8a6ef08b.zip
further speed improvements by eliminating most ...
further speed improvements by eliminating most uses of paramTypes. Knocks off about 3% of typer time. Not overwhelming but still worth doing. Review by rytz.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Implicits.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Implicits.scala8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
index 27646363cb..9657cea101 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
@@ -642,6 +642,8 @@ self: Analyzer =>
* - the type itself
* - the parts of its immediate components (prefix and argument)
* - the parts of its base types
+ * - for alias types and abstract types, we take instead the parts
+ * - of their upper bounds.
* @return For those parts that refer to classes with companion objects that
* can be accessed with unambiguous stable prefixes, the implicits infos
* which are members of these companion objects.
@@ -675,7 +677,7 @@ self: Analyzer =>
args foreach getParts
}
} else if (sym.isAliasType) {
- getParts(tp.dealias)
+ getParts(tp.normalize)
} else if (sym.isAbstractType) {
getParts(tp.bounds.hi)
}
@@ -687,7 +689,9 @@ self: Analyzer =>
for (p <- ps) getParts(p)
case AnnotatedType(_, t, _) =>
getParts(t)
- case ExistentialType(tparams, t) =>
+ case ExistentialType(_, t) =>
+ getParts(t)
+ case PolyType(_, t) =>
getParts(t)
case _ =>
}