File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
src/compiler/scala/tools/nsc/backend/icode Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -876,13 +876,15 @@ abstract class GenICode extends SubComponent {
876
876
genLoadModule(ctx, tree)
877
877
generatedType = toTypeKind(sym.info)
878
878
} else {
879
- try {
880
- val Some (l) = ctx.method.lookupLocal(sym)
881
- ctx.bb.emit(LOAD_LOCAL (l), tree.pos)
882
- generatedType = l.kind
883
- } catch {
884
- case ex : MatchError =>
885
- abort(" symbol " + sym + " does not exist in " + ctx.method)
879
+ ctx.method.lookupLocal(sym) match {
880
+ case Some (l) =>
881
+ ctx.bb.emit(LOAD_LOCAL (l), tree.pos)
882
+ generatedType = l.kind
883
+ case None =>
884
+ val saved = settings.uniqid
885
+ settings.uniqid.value = true
886
+ try abort(s " symbol $sym does not exist in ${ctx.method}, which contains locals ${ctx.method.locals.mkString(" ," )}" )
887
+ finally settings.uniqid.value = saved
886
888
}
887
889
}
888
890
}
You can’t perform that action at this time.
0 commit comments