diff options
Diffstat (limited to 'test/files/run/macro-duplicate')
-rw-r--r-- | test/files/run/macro-duplicate/Impls_Macros_1.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/files/run/macro-duplicate/Impls_Macros_1.scala b/test/files/run/macro-duplicate/Impls_Macros_1.scala index de81923330..84fb2c5b61 100644 --- a/test/files/run/macro-duplicate/Impls_Macros_1.scala +++ b/test/files/run/macro-duplicate/Impls_Macros_1.scala @@ -1,4 +1,4 @@ -import scala.reflect.macros.Context +import scala.reflect.macros.blackbox.Context object Macros { def impl(c: Context) = { @@ -10,11 +10,11 @@ object Macros { case Template(_, _, ctor :: defs) => val defs1 = defs collect { case ddef @ DefDef(mods, name, tparams, vparamss, tpt, body) => - val future = Select(Select(Select(Ident(newTermName("scala")), newTermName("concurrent")), newTermName("package")), newTermName("future")) - val Future = Select(Select(Ident(newTermName("scala")), newTermName("concurrent")), newTypeName("Future")) + val future = Select(Select(Ident(TermName("scala")), TermName("concurrent")), TermName("Future")) + val Future = Select(Select(Ident(TermName("scala")), TermName("concurrent")), TypeName("Future")) val tpt1 = if (tpt.isEmpty) tpt else AppliedTypeTree(Future, List(tpt)) val body1 = Apply(future, List(body)) - val name1 = newTermName("async" + name.toString.capitalize) + val name1 = TermName("async" + name.toString.capitalize) DefDef(mods, name1, tparams, vparamss, tpt1, body1) } Template(Nil, emptyValDef, ctor +: defs ::: defs1) @@ -26,4 +26,4 @@ object Macros { } def foo = macro impl -}
\ No newline at end of file +} |