diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2015-04-07 15:30:21 +0200 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2015-04-07 15:30:21 +0200 |
commit | 9e2e63306bc111a933418eb16ff890fa748301f9 (patch) | |
tree | 68d33154bac82ba85fe9c2de3170a4c5510f2dd0 /src/compiler | |
parent | 214d79841970be29bac126eb48f955c8f082e1bc (diff) | |
parent | a72eeb953b738ba0f0b7a9024f16bca3009f23dc (diff) | |
download | scala-9e2e63306bc111a933418eb16ff890fa748301f9.tar.gz scala-9e2e63306bc111a933418eb16ff890fa748301f9.tar.bz2 scala-9e2e63306bc111a933418eb16ff890fa748301f9.zip |
Merge pull request #4432 from retronym/ticket/9264
SI-9264 An even-better diagnostic for an unexplained crash
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/icode/GenICode.scala | 7 |
1 files changed, 6 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 185fd93501..137954b52d 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala @@ -883,7 +883,12 @@ abstract class GenICode extends SubComponent { 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(",")}") + try { + val methodCode = unit.body.collect { case dd: DefDef + if dd.symbol == ctx.method.symbol => showCode(dd); + }.headOption.getOrElse("<unknown>") + abort(s"symbol $sym does not exist in ${ctx.method}, which contains locals ${ctx.method.locals.mkString(",")}. \nMethod code: $methodCode") + } finally settings.uniqid.value = saved } } |