summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-03-26 19:43:00 +0000
committerPaul Phillips <paulp@improving.org>2011-03-26 19:43:00 +0000
commit0d324c4e10d5dc7662629468801348b867280e2e (patch)
treefb4a701ee907a4d6e2e5c851403e9c42bc53f0b9 /src
parent9e0b5eb6c4ff9ca165c8e8fd629e23ae061d77f9 (diff)
downloadscala-0d324c4e10d5dc7662629468801348b867280e2e.tar.gz
scala-0d324c4e10d5dc7662629468801348b867280e2e.tar.bz2
scala-0d324c4e10d5dc7662629468801348b867280e2e.zip
Suppressed unnecessary checkcasts on Throwables...
Suppressed unnecessary checkcasts on Throwables which were letting AnyRefs reach the backend. Looks like this was my doing when trying to wake back up the icode checker. Closes #4393, no review.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/GenICode.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
index 64170482ce..249aefb10e 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
@@ -1153,7 +1153,7 @@ abstract class GenICode extends SubComponent {
ctx.bb.emit(DROP(from))
ctx.bb.emit(CONSTANT(Constant(null)))
}
- else if (from == ThrowableReference) {
+ else if (from == ThrowableReference && !(ThrowableClass.tpe <:< to.toType)) {
log("Inserted check-cast on throwable to " + to + " at " + pos)
ctx.bb.emit(CHECK_CAST(to))
}