diff options
author | Paul Phillips <paulp@improving.org> | 2012-01-24 14:53:51 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-01-24 14:53:51 -0800 |
commit | 30b2064080044895bdf6ed0969b5bb001a0ee230 (patch) | |
tree | a7f510160542959ba693ea6ff0dccef3232962bf | |
parent | 969e2587c2d6c5f5c17d550d3192f68c4b342f45 (diff) | |
download | scala-30b2064080044895bdf6ed0969b5bb001a0ee230.tar.gz scala-30b2064080044895bdf6ed0969b5bb001a0ee230.tar.bz2 scala-30b2064080044895bdf6ed0969b5bb001a0ee230.zip |
Eliminated redundant function.
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Implicits.scala | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala index 53e88b33c8..e14f0bcd87 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala @@ -94,21 +94,13 @@ trait Implicits { private val ManifestSymbols = Set(PartialManifestClass, FullManifestClass, OptManifestClass) - /** Map all type params in given list to WildcardType - * @param tparams The list of type parameters to map - * @param tp The type in which to do the mapping - */ - private def tparamsToWildcards(tparams: List[Symbol], tp: Type) = - if (tparams.isEmpty) tp - else tp.instantiateTypeParams(tparams, tparams map (_ => WildcardType)) - /* Map a polytype to one in which all type parameters and argument-dependent types are replaced by wildcards. * Consider `implicit def b(implicit x: A): x.T = error("")`. We need to approximate DebruijnIndex types * when checking whether `b` is a valid implicit, as we haven't even searched a value for the implicit arg `x`, * so we have to approximate (otherwise it is excluded a priori). */ private def depoly(tp: Type): Type = tp match { - case PolyType(tparams, restpe) => tparamsToWildcards(tparams, ApproximateDependentMap(restpe)) + case PolyType(tparams, restpe) => deriveTypeWithWildcards(tparams)(ApproximateDependentMap(restpe)) case _ => ApproximateDependentMap(tp) } |