summaryrefslogtreecommitdiff
path: root/src/compiler/scala/reflect/reify/phases/Reshape.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-01-25 13:39:20 -0800
committerPaul Phillips <paulp@improving.org>2013-01-25 13:39:50 -0800
commit950e938bb08afc08ba6b91af5468d0f703924356 (patch)
tree37ec7fc360018b67a2b2b0e235bd322a873e74e1 /src/compiler/scala/reflect/reify/phases/Reshape.scala
parentff2ca683cb75b18e8001680aa3ec752929179925 (diff)
downloadscala-950e938bb08afc08ba6b91af5468d0f703924356.tar.gz
scala-950e938bb08afc08ba6b91af5468d0f703924356.tar.bz2
scala-950e938bb08afc08ba6b91af5468d0f703924356.zip
Revert "SI-5824 Fix crashes in reify with _*"
This reverts commit 0a25ee3431d0314c782dd2e6620bc75c4de0d1a4. It came with a test failure which I overlooked.
Diffstat (limited to 'src/compiler/scala/reflect/reify/phases/Reshape.scala')
-rw-r--r--src/compiler/scala/reflect/reify/phases/Reshape.scala12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/compiler/scala/reflect/reify/phases/Reshape.scala b/src/compiler/scala/reflect/reify/phases/Reshape.scala
index 71fe4ddeea..5dd5f08b45 100644
--- a/src/compiler/scala/reflect/reify/phases/Reshape.scala
+++ b/src/compiler/scala/reflect/reify/phases/Reshape.scala
@@ -187,12 +187,8 @@ trait Reshape {
}
private def toPreTyperTypedOrAnnotated(tree: Tree): Tree = tree match {
- case ty @ Typed(expr1, tpt) =>
+ case ty @ Typed(expr1, tt @ TypeTree()) =>
if (reifyDebug) println("reify typed: " + tree)
- val original = tpt match {
- case tt @ TypeTree() => tt.original
- case tpt => tpt
- }
val annotatedArg = {
def loop(tree: Tree): Tree = tree match {
case annotated1 @ Annotated(ann, annotated2 @ Annotated(_, _)) => loop(annotated2)
@@ -200,15 +196,15 @@ trait Reshape {
case _ => EmptyTree
}
- loop(original)
+ loop(tt.original)
}
if (annotatedArg != EmptyTree) {
if (annotatedArg.isType) {
if (reifyDebug) println("verdict: was an annotated type, reify as usual")
ty
} else {
- if (reifyDebug) println("verdict: was an annotated value, equivalent is " + original)
- toPreTyperTypedOrAnnotated(original)
+ if (reifyDebug) println("verdict: was an annotated value, equivalent is " + tt.original)
+ toPreTyperTypedOrAnnotated(tt.original)
}
} else {
if (reifyDebug) println("verdict: wasn't annotated, reify as usual")