summaryrefslogtreecommitdiff
path: root/test/files/run/macro-impl-relaxed
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2013-06-03 21:51:39 +0200
committerEugene Burmako <xeno.by@gmail.com>2013-06-03 22:46:05 +0200
commit488444b327f222fa4ef317b5d96fb7cdf732d4d2 (patch)
tree338381bd0e07faf87015c302a3cf4ba8a7204c28 /test/files/run/macro-impl-relaxed
parent69887ddd682057c4787e2e4377830390faf8ecf1 (diff)
downloadscala-488444b327f222fa4ef317b5d96fb7cdf732d4d2.tar.gz
scala-488444b327f222fa4ef317b5d96fb7cdf732d4d2.tar.bz2
scala-488444b327f222fa4ef317b5d96fb7cdf732d4d2.zip
cleans up 82f0925
Updates comments, implements accidentally forgotten IMPLPARAM_TREE, creates a test to ensure that nothing else is overseen.
Diffstat (limited to 'test/files/run/macro-impl-relaxed')
-rw-r--r--test/files/run/macro-impl-relaxed/Macros_1.scala14
-rw-r--r--test/files/run/macro-impl-relaxed/Test_2.scala6
2 files changed, 20 insertions, 0 deletions
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