summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2011-10-05 10:38:05 +0000
committerMartin Odersky <odersky@gmail.com>2011-10-05 10:38:05 +0000
commitb1c420e48bbe1ab4d04e7d8e0efae6c04b0284a0 (patch)
tree0eb31ab3060f713779e448a80f9ba32a9ee780c0
parentc7f14dbbcca0b9fb1126aeb9ffc0a7c3eb7aa035 (diff)
downloadscala-b1c420e48bbe1ab4d04e7d8e0efae6c04b0284a0.tar.gz
scala-b1c420e48bbe1ab4d04e7d8e0efae6c04b0284a0.tar.bz2
scala-b1c420e48bbe1ab4d04e7d8e0efae6c04b0284a0.zip
Adding debug output to track down override mark...
Adding debug output to track down override marker error in IDE.
-rw-r--r--src/compiler/scala/reflect/internal/Types.scala18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/compiler/scala/reflect/internal/Types.scala b/src/compiler/scala/reflect/internal/Types.scala
index d75c7abe13..ead767f76a 100644
--- a/src/compiler/scala/reflect/internal/Types.scala
+++ b/src/compiler/scala/reflect/internal/Types.scala
@@ -3642,17 +3642,20 @@ A type's typeSymbol should never be inspected directly.
else {
def throwError = abort("" + tp + sym.locationString + " cannot be instantiated from " + pre.widen)
- def instParam(ps: List[Symbol], as: List[Type]): Type =
- if (ps.isEmpty) throwError
- else if (sym eq ps.head)
- // @M! don't just replace the whole thing, might be followed by type application
- appliedType(as.head, args mapConserve (this)) // @M: was as.head
- else instParam(ps.tail, as.tail);
val symclazz = sym.owner
if (symclazz == clazz && !pre.isInstanceOf[TypeVar] && (pre.widen.typeSymbol isNonBottomSubClass symclazz)) {
// have to deconst because it may be a Class[T].
pre.baseType(symclazz).deconst match {
case TypeRef(_, basesym, baseargs) =>
+ def instParam(ps: List[Symbol], as: List[Type]): Type =
+ if (ps.isEmpty) {
+ settings.uniqid.value = true
+ println("confused with params: " + sym + " in " + sym.owner + " not in " + ps + " of " + basesym)
+ throwError
+ } else if (sym eq ps.head)
+ // @M! don't just replace the whole thing, might be followed by type application
+ appliedType(as.head, args mapConserve (this)) // @M: was as.head
+ else instParam(ps.tail, as.tail);
//Console.println("instantiating " + sym + " from " + basesym + " with " + basesym.typeParams + " and " + baseargs+", pre = "+pre+", symclazz = "+symclazz);//DEBUG
if (sameLength(basesym.typeParams, baseargs)) {
instParam(basesym.typeParams, baseargs)
@@ -3666,7 +3669,8 @@ A type's typeSymbol should never be inspected directly.
case ExistentialType(tparams, qtpe) =>
capturedParams = capturedParams union tparams
toInstance(qtpe, clazz)
- case _ =>
+ case t =>
+ println("bad type: "+t)
throwError
}
} else toInstance(base(pre, clazz).prefix, clazz.owner)