summaryrefslogtreecommitdiff
path: root/test/files/run/macro-expand-implicit-argument
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-11-21 13:07:52 +0100
committerEugene Burmako <xeno.by@gmail.com>2012-12-06 22:52:44 +0100
commit5546a72f35e1301d38e3fd56873db7a1fc5163bb (patch)
tree99123c65049c323d9ee520eaf06e5fbc984d559e /test/files/run/macro-expand-implicit-argument
parent58969850a0991a72c360433540943eae4b10dc6b (diff)
downloadscala-5546a72f35e1301d38e3fd56873db7a1fc5163bb.tar.gz
scala-5546a72f35e1301d38e3fd56873db7a1fc5163bb.tar.bz2
scala-5546a72f35e1301d38e3fd56873db7a1fc5163bb.zip
SI-6696 removes "helper" tree factory methods
As experience shows, these methods can easily be a source of confusion for the newcomers: https://issues.scala-lang.org/browse/SI-6696. I'm only leaving the TypeTree(tp) factory, since the facility to set underlying types for type trees is not exposed in the public API, as it's inherently mutable.
Diffstat (limited to 'test/files/run/macro-expand-implicit-argument')
-rw-r--r--test/files/run/macro-expand-implicit-argument/Macros_1.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/files/run/macro-expand-implicit-argument/Macros_1.scala b/test/files/run/macro-expand-implicit-argument/Macros_1.scala
index b1665256cd..d9fd5b8cb0 100644
--- a/test/files/run/macro-expand-implicit-argument/Macros_1.scala
+++ b/test/files/run/macro-expand-implicit-argument/Macros_1.scala
@@ -43,16 +43,16 @@ object Macros {
val n = as.length
val arr = newTermName("arr")
- val create = Apply(Select(ct.tree, "newArray"), List(const(n)))
+ val create = Apply(Select(ct.tree, newTermName("newArray")), List(const(n)))
val arrtpe = TypeTree(implicitly[c.WeakTypeTag[Array[A]]].tpe)
val valdef = ValDef(Modifiers(), arr, arrtpe, create)
val updates = (0 until n).map {
- i => Apply(Select(Ident(arr), "update"), List(const(i), as(i).tree))
+ i => Apply(Select(Ident(arr), newTermName("update")), List(const(i), as(i).tree))
}
- val exprs = Seq(valdef) ++ updates ++ Seq(Ident(arr))
- val block = Block(exprs:_*)
+ val exprs = (Seq(valdef) ++ updates ++ Seq(Ident(arr))).toList
+ val block = Block(exprs.init, exprs.last)
c.Expr[Array[A]](block)
}