summaryrefslogtreecommitdiff
path: root/test/files/run/repl-term-macros.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2013-10-17 19:12:59 +0200
committerEugene Burmako <xeno.by@gmail.com>2013-10-18 16:58:51 +0200
commit3b4dc75710ac51de729224929690422d1b44e3ad (patch)
tree27337cd2a0a66e98650488a5cbff4e4dcb499745 /test/files/run/repl-term-macros.scala
parent54707cb45018170e31eb188a9a694ab9b0728f71 (diff)
downloadscala-3b4dc75710ac51de729224929690422d1b44e3ad.tar.gz
scala-3b4dc75710ac51de729224929690422d1b44e3ad.tar.bz2
scala-3b4dc75710ac51de729224929690422d1b44e3ad.zip
deprecates raw tree manipulation facilities in macros.Context
Diffstat (limited to 'test/files/run/repl-term-macros.scala')
-rw-r--r--test/files/run/repl-term-macros.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/files/run/repl-term-macros.scala b/test/files/run/repl-term-macros.scala
index f826259be9..9824bf49cb 100644
--- a/test/files/run/repl-term-macros.scala
+++ b/test/files/run/repl-term-macros.scala
@@ -5,15 +5,15 @@ object Test extends ReplTest {
import scala.reflect.macros.Context
import language.experimental.macros
-def impl1(c: Context) = c.literalUnit
+def impl1(c: Context) = { import c.universe._; c.Expr[Unit](Literal(Constant(()))) }
def foo1 = macro impl1
foo1
-def impl2(c: Context)() = c.literalUnit
+def impl2(c: Context)() = { import c.universe._; c.Expr[Unit](Literal(Constant(()))) }
def foo2() = macro impl2
foo2()
-def impl3(c: Context)(x: c.Expr[Int])(y: c.Expr[Int]) = c.literalUnit
+def impl3(c: Context)(x: c.Expr[Int])(y: c.Expr[Int]) = { import c.universe._; c.Expr[Unit](Literal(Constant(()))) }
def foo3(x: Int)(y: Int) = macro impl3
foo3(2)(3)
"""