summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-04-01 16:52:54 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2015-04-01 16:52:54 +0200
commit3aea9219c40912f1fe501be67e1a630fd595a35d (patch)
treed6a5634dcaef14f982002fa088df1b5f7ef6b34d /src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
parent51971954ace37ad6af8bf354d92f6baf51d16324 (diff)
parent32f520f3ed78ecde390dc7b1b48d3130e412a9dc (diff)
downloadscala-3aea9219c40912f1fe501be67e1a630fd595a35d.tar.gz
scala-3aea9219c40912f1fe501be67e1a630fd595a35d.tar.bz2
scala-3aea9219c40912f1fe501be67e1a630fd595a35d.zip
Merge commit '32f520f' into merge/2.11-to-2.12-apr-1
Diffstat (limited to 'src/compiler/scala/tools/nsc/backend/icode/GenICode.scala')
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/GenICode.scala16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
index 72aa44d8d9..b1b6c73f8d 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
@@ -876,13 +876,15 @@ abstract class GenICode extends SubComponent {
genLoadModule(ctx, tree)
generatedType = toTypeKind(sym.info)
} else {
- try {
- val Some(l) = ctx.method.lookupLocal(sym)
- ctx.bb.emit(LOAD_LOCAL(l), tree.pos)
- generatedType = l.kind
- } catch {
- case ex: MatchError =>
- abort("symbol " + sym + " does not exist in " + ctx.method)
+ ctx.method.lookupLocal(sym) match {
+ case Some(l) =>
+ ctx.bb.emit(LOAD_LOCAL(l), tree.pos)
+ generatedType = l.kind
+ case None =>
+ val saved = settings.uniqid
+ settings.uniqid.value = true
+ try abort(s"symbol $sym does not exist in ${ctx.method}, which contains locals ${ctx.method.locals.mkString(",")}")
+ finally settings.uniqid.value = saved
}
}
}