From 488444b327f222fa4ef317b5d96fb7cdf732d4d2 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Mon, 3 Jun 2013 21:51:39 +0200 Subject: cleans up 82f0925 Updates comments, implements accidentally forgotten IMPLPARAM_TREE, creates a test to ensure that nothing else is overseen. --- test/files/run/macro-impl-relaxed/Macros_1.scala | 14 ++++++++++++++ test/files/run/macro-impl-relaxed/Test_2.scala | 6 ++++++ 2 files changed, 20 insertions(+) create mode 100644 test/files/run/macro-impl-relaxed/Macros_1.scala create mode 100644 test/files/run/macro-impl-relaxed/Test_2.scala (limited to 'test/files/run/macro-impl-relaxed') diff --git a/test/files/run/macro-impl-relaxed/Macros_1.scala b/test/files/run/macro-impl-relaxed/Macros_1.scala new file mode 100644 index 0000000000..af62646b4e --- /dev/null +++ b/test/files/run/macro-impl-relaxed/Macros_1.scala @@ -0,0 +1,14 @@ +import language.experimental.macros +import scala.reflect.macros.Context + +object Macros { + def implUU(c: Context)(x: c.Tree): c.Tree = x + def implTU(c: Context)(x: c.Expr[Int]): c.Tree = x.tree + def implUT(c: Context)(x: c.Tree): c.Expr[Int] = c.Expr[Int](x) + def implTT(c: Context)(x: c.Expr[Int]): c.Expr[Int] = x + + def fooUU(x: Int): Int = macro implUU + def fooTU(x: Int): Int = macro implTU + def fooUT(x: Int): Int = macro implUT + def fooTT(x: Int): Int = macro implTT +} \ No newline at end of file diff --git a/test/files/run/macro-impl-relaxed/Test_2.scala b/test/files/run/macro-impl-relaxed/Test_2.scala new file mode 100644 index 0000000000..2eaeef0fd0 --- /dev/null +++ b/test/files/run/macro-impl-relaxed/Test_2.scala @@ -0,0 +1,6 @@ +object Test extends App { + println(Macros.fooUU(2)) + println(Macros.fooTU(2)) + println(Macros.fooUT(2)) + println(Macros.fooTT(2)) +} \ No newline at end of file -- cgit v1.2.3