summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2010-09-05 13:21:11 +0000
committerIulian Dragos <jaguarul@gmail.com>2010-09-05 13:21:11 +0000
commitad22d88f5666fafd41ac1dabf98d7c0d828ed852 (patch)
tree0b2c7333f1464f55033f03e1b9db53c7cbfed014
parent9813e37ca676ef88829b0026ab304386ecf3e473 (diff)
downloadscala-ad22d88f5666fafd41ac1dabf98d7c0d828ed852.tar.gz
scala-ad22d88f5666fafd41ac1dabf98d7c0d828ed852.tar.bz2
scala-ad22d88f5666fafd41ac1dabf98d7c0d828ed852.zip
Closes #3636, crash when unexpected types arriv...
Closes #3636, crash when unexpected types arrive at specialization. no review.
-rw-r--r--src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
index abc590fb6b..0f6b3c26f5 100644
--- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
+++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
@@ -805,6 +805,9 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
case (RefinedType(_, _), RefinedType(_, _)) => env
case (AnnotatedType(_, tp1, _), tp2) => unify(tp2, tp1, env)
case (ExistentialType(_, res1), _) => unify(tp2, res1, env)
+ case _ =>
+ log("don't know how to unify %s [%s] with %s [%s]".format(tp1, tp1.getClass, tp2, tp2.getClass))
+ env
}
}
@@ -1087,7 +1090,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
case Select(qual, name) =>
if (settings.debug.value)
- log("looking at Select: " + tree + " sym: " + symbol + ": " + symbol.info + "[tree.tpe: " + tree.tpe + "]")
+ log("[%s] looking at Select: %s sym: %s: %s [tree.tpe: %s]".format(tree.pos.line, tree, symbol, symbol.info, tree.tpe))
if (!specializedTypeVars(symbol.info).isEmpty && name != nme.CONSTRUCTOR) {
val env = unify(symbol.tpe, tree.tpe, emptyEnv)