summaryrefslogtreecommitdiff
path: root/test/files/run/macro-range/Expansion_Impossible_2.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/macro-range/Expansion_Impossible_2.scala')
-rw-r--r--test/files/run/macro-range/Expansion_Impossible_2.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/files/run/macro-range/Expansion_Impossible_2.scala b/test/files/run/macro-range/Expansion_Impossible_2.scala
index 7a093b74ee..051afff99c 100644
--- a/test/files/run/macro-range/Expansion_Impossible_2.scala
+++ b/test/files/run/macro-range/Expansion_Impossible_2.scala
@@ -14,7 +14,7 @@ object Impls {
// scala"{ var i = $low; val h = $hi; while (i < h) { $f(i); i = i + 1 } }
// or:
// scala"($_this: RangeDefault).foreach($f)"
- c.prefix.tree match {
+ Expr(c.prefix.tree match {
case Apply(Select(New(tpt), initName), List(lo, hi)) if tpt.symbol.fullName == "Range" =>
val iname = newTermName("$i")
val hname = newTermName("$h")
@@ -23,7 +23,7 @@ object Impls {
val labelname = newTermName("$while")
val cond = makeBinop(iref, "$less", href)
val body = Block(
- List(makeApply(f, List(iref))),
+ List(makeApply(f.tree, List(iref))),
Assign(iref, makeBinop(iref, "$plus", Literal(Constant(1)))))
val generated =
Block(
@@ -37,10 +37,10 @@ object Impls {
case _ =>
Apply(
Select(
- Typed(c.prefix, Ident(newTypeName("RangeDefault"))),
+ Typed(c.prefix.tree, Ident(newTypeName("RangeDefault"))),
newTermName("foreach")),
- List(f))
- }
+ List(f.tree))
+ })
}
}