aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-02-27 11:42:03 +0100
committerMartin Odersky <odersky@gmail.com>2013-02-27 11:42:03 +0100
commit5b786065301ecab3fd1b38ac9089b5d58acc9082 (patch)
tree6ad491c3ccaaff496c36a5d05297036cbef3a99f /src/dotty/tools/dotc/core/Types.scala
parent2c8d6d37f254cfbaed8f5a87308fc25c2816d73d (diff)
downloaddotty-5b786065301ecab3fd1b38ac9089b5d58acc9082.tar.gz
dotty-5b786065301ecab3fd1b38ac9089b5d58acc9082.tar.bz2
dotty-5b786065301ecab3fd1b38ac9089b5d58acc9082.zip
Refinements to signature handling.
Decoupled paramSignature from erasure in the interest of efficiency.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index f1c0de2be..a5fa211ec 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -14,7 +14,7 @@ import SymDenotations._
import Denotations._
import Periods._
import TypedTrees.tpd._, TypedTrees.TreeMapper
-import transform.Erasure._
+import transform.Erasure
import scala.util.hashing.{ MurmurHash3 => hashing }
import collection.mutable
@@ -840,8 +840,8 @@ object Types {
unique(new CachedTermRef(prefix, name))
def apply(prefix: Type, sym: TermSymbol)(implicit ctx: Context) =
unique(new TermRefBySym(prefix, sym)(ctx))
- def apply(prefix: Type, name: TermName, signature: Signature)(implicit ctx: Context) =
- unique(new TermRefWithSignature(prefix, name, signature))
+ def apply(prefix: Type, name: TermName, sig: Signature)(implicit ctx: Context) =
+ unique(new TermRefWithSignature(prefix, name, sig))
}
object TypeRef {
@@ -989,13 +989,11 @@ object Types {
}
private def computeSignature(implicit ctx: Context): Signature = {
- def paramSig(tp: Type): TypeName =
- erasure(tp).typeSymbol.asType.name
val followSig = resultType match {
case rtp: MethodType => rtp.signature
case _ => Nil
}
- (paramTypes map paramSig) ++ followSig
+ (paramTypes map Erasure.paramSignature) ++ followSig
}
def derivedMethodType(paramNames: List[TermName], paramTypes: List[Type], restpe: Type)(implicit ctx: Context) =