summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@gmail.com>2012-10-09 10:13:17 +0200
committerHubert Plociniczak <hubert.plociniczak@gmail.com>2012-10-18 10:51:24 +0200
commited09630a9846cb5dfbc42229f0c9a397254ce401 (patch)
tree0796ec69f6284cf9953cca83bd99569bbd06f72c /src
parenta3c5427fa0b1347d932b2e2f2bf4c357b67604f1 (diff)
downloadscala-ed09630a9846cb5dfbc42229f0c9a397254ce401.tar.gz
scala-ed09630a9846cb5dfbc42229f0c9a397254ce401.tar.bz2
scala-ed09630a9846cb5dfbc42229f0c9a397254ce401.zip
Crash on missing accessor (internal bug in the lazy vals implementation) instead of trying to recover from the bug
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/reflect/reify/Errors.scala5
-rw-r--r--src/compiler/scala/reflect/reify/phases/Reshape.scala3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/scala/reflect/reify/Errors.scala b/src/compiler/scala/reflect/reify/Errors.scala
index c25112941c..b8b5f8033b 100644
--- a/src/compiler/scala/reflect/reify/Errors.scala
+++ b/src/compiler/scala/reflect/reify/Errors.scala
@@ -71,4 +71,9 @@ trait Errors {
val msg = "internal error: erroneous reifees are not supported, make sure that your reifee has typechecked successfully before passing it to the reifier"
throw new UnexpectedReificationException(defaultErrorPosition, msg)
}
+
+ def CannotReifyInvalidLazyVal(tree: ValDef) = {
+ val msg = "internal error: could not reconstruct original lazy val due to missing accessor"
+ throw new UnexpectedReificationException(tree.pos, msg)
+ }
}
diff --git a/src/compiler/scala/reflect/reify/phases/Reshape.scala b/src/compiler/scala/reflect/reify/phases/Reshape.scala
index 9a1732a872..1b7509fdbe 100644
--- a/src/compiler/scala/reflect/reify/phases/Reshape.scala
+++ b/src/compiler/scala/reflect/reify/phases/Reshape.scala
@@ -326,8 +326,7 @@ trait Reshape {
case Some(ddef) =>
toPreTyperLazyVal(ddef)
case None =>
- if (reifyDebug) println("couldn't find corresponding lazy val accessor")
- vdef
+ CannotReifyInvalidLazyVal(vdef)
}
if (reifyDebug) println(s"reconstructed lazy val is $vdef1")
vdef1::Nil