aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-03-23 12:02:32 +0100
committerMartin Odersky <odersky@gmail.com>2013-03-23 12:02:32 +0100
commitf73792d9c6a41c692cc689c52e481e15120bccc4 (patch)
tree683c0e622164f447430700505347ee4fbec31fee /src/dotty/tools/dotc/core/Types.scala
parentb440606b0f0d1772d8a1c3bc1c36b3aa3cb576b5 (diff)
downloaddotty-f73792d9c6a41c692cc689c52e481e15120bccc4.tar.gz
dotty-f73792d9c6a41c692cc689c52e481e15120bccc4.tar.bz2
dotty-f73792d9c6a41c692cc689c52e481e15120bccc4.zip
More fixes to classfile reading.
Most important one: Getting equality of NamedTypes right.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index b061a1227..74bf684e1 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -532,7 +532,7 @@ object Types {
def recur(tp: Type, tparams: List[TypeSymbol], args: List[Type]): Type = args match {
case arg :: args1 =>
if (tparams.isEmpty) {
- println(s"applied type mismatch: $this $args, $typeParams = typeParams") // !!! DEBUG
+ println(s"applied type mismatch: $this $args, typeParams = $typeParams, tsym = ${this.typeSymbol.debugString}") // !!! DEBUG
println(s"precomplete decls = ${typeSymbol.preCompleteDecls.toList.map(_.denot).mkString("\n ")}")
}
val tparam = tparams.head
@@ -913,6 +913,16 @@ object Types {
NamedType(prefix, name)
override def computeHash = doHash(name, prefix)
+
+ override def equals(that: Any) = that match {
+ case that: HasFixedSym => false
+ case that: TermRefWithSignature => false
+ case that: NamedType =>
+ this.prefix == that.prefix &&
+ this.name == that.name
+ case _ =>
+ false
+ }
}
abstract case class TermRef(override val prefix: Type, name: TermName) extends NamedType with SingletonType