summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2007-04-23 15:00:18 +0000
committerMartin Odersky <odersky@gmail.com>2007-04-23 15:00:18 +0000
commitdd225e9a2580d1824be7016cc9428d5aeb7122fa (patch)
tree94244cc79acf0e37f26309cbf7685fdfeb89596f /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parenta9cc141f197da8741b395c4e2321c4f8b15e3c0c (diff)
downloadscala-dd225e9a2580d1824be7016cc9428d5aeb7122fa.tar.gz
scala-dd225e9a2580d1824be7016cc9428d5aeb7122fa.tar.bz2
scala-dd225e9a2580d1824be7016cc9428d5aeb7122fa.zip
some optimizations. new closure syntax.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 8a03ae3a44..de86bc9948 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -642,7 +642,7 @@ trait Typers requires Analyzer {
inferConstructorInstance(tree1, clazz.typeParams, widen(pt))
} catch {
case tpe : TypeError => throw tpe
- case t : Throwable =>
+ case t : Exception
logError("CONTEXT: " + (tree.pos).dbgString, t)
throw t
}
@@ -2624,7 +2624,7 @@ trait Typers requires Analyzer {
//Console.println("caught "+ex+" in typed");//DEBUG
reportTypeError(tree.pos, ex)
setError(tree)
- case ex: Throwable =>
+ case ex: Exception
// if (settings.debug.value) // @M causes cyclic reference error
// Console.println("exception when typing "+tree+", pt = "+pt)
if ((context ne null) && (context.unit ne null) &&
@@ -2744,7 +2744,7 @@ trait Typers requires Analyzer {
case TypeRef(pre, sym, _) => sym.isPackageClass || sym.isModuleClass && isStable(pre)
case _ => tp.isStable
}
- if (isCompatible(depoly(info.tpe), pt) && isStable(info.pre)) {
+ if (isPlausiblyCompatible(info.tpe, pt) && isCompatible(depoly(info.tpe), pt) && isStable(info.pre)) {
val tree = atPos(pos) {
if (info.pre == NoPrefix/*isLocal*/) Ident(info.name)
else Select(gen.mkAttributedQualifier(info.pre), info.name)