From f73792d9c6a41c692cc689c52e481e15120bccc4 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 23 Mar 2013 12:02:32 +0100 Subject: More fixes to classfile reading. Most important one: Getting equality of NamedTypes right. --- src/dotty/tools/dotc/core/Types.scala | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/core/Types.scala') 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 -- cgit v1.2.3