diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-11-21 13:07:52 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-12-06 22:52:44 +0100 |
commit | 5546a72f35e1301d38e3fd56873db7a1fc5163bb (patch) | |
tree | 99123c65049c323d9ee520eaf06e5fbc984d559e /test/files/run/macro-reify-freevars/Test_2.scala | |
parent | 58969850a0991a72c360433540943eae4b10dc6b (diff) | |
download | scala-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-reify-freevars/Test_2.scala')
-rw-r--r-- | test/files/run/macro-reify-freevars/Test_2.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/files/run/macro-reify-freevars/Test_2.scala b/test/files/run/macro-reify-freevars/Test_2.scala index e24758cfb4..7af9d89bdb 100644 --- a/test/files/run/macro-reify-freevars/Test_2.scala +++ b/test/files/run/macro-reify-freevars/Test_2.scala @@ -2,8 +2,8 @@ object Test extends App { import scala.reflect.runtime.universe._ import scala.reflect.runtime.{currentMirror => cm} import scala.tools.reflect.ToolBox - val q = New(AppliedTypeTree(Select(Select(Select(Ident("scala"), newTermName("collection")), newTermName("slick")), newTypeName("Queryable")), List(Ident("Int")))) - val x = ValDef(NoMods, newTermName("x"), Ident("Int"), EmptyTree) + val q = New(AppliedTypeTree(Select(Select(Select(Ident(newTermName("scala")), newTermName("collection")), newTermName("slick")), newTypeName("Queryable")), List(Ident(newTermName("Int"))))) + val x = ValDef(NoMods, newTermName("x"), Ident(newTermName("Int")), EmptyTree) val fn = Function(List(x), Apply(Select(Ident(newTermName("x")), newTermName("$plus")), List(Literal(Constant("5"))))) val tree = Apply(Select(q, newTermName("map")), List(fn)) try cm.mkToolBox().eval(tree) |